KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_viewer_frame.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 (C) 2012-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2008-2016 Wayne Stambaugh <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
23#include <bitmaps.h>
24#include <board_commit.h>
25#include <board.h>
28#include <footprint.h>
29#include <confirm.h>
30#include <eda_pattern_match.h>
31#include <footprint_info.h>
34#include <kiway.h>
35#include <kiway_mail.h>
37#include <widgets/kistatusbar.h>
38#include <widgets/msgpanel.h>
39#include <widgets/wx_listbox.h>
42#include <pad.h>
43#include <pcb_draw_panel_gal.h>
44#include <pcb_painter.h>
45#include <pcbnew_id.h>
47#include <pgm_base.h>
48#include <pcbnew_settings.h>
49#include <project_pcb.h>
53#include <tool/action_toolbar.h>
54#include <tool/common_control.h>
55#include <tool/common_tools.h>
56#include <tool/selection.h>
58#include <tool/tool_manager.h>
59#include <tool/zoom_tool.h>
61#include <tools/pcb_actions.h>
63#include <tools/pcb_control.h>
69#include <wx/srchctrl.h>
70#include <wx/tokenzr.h>
71#include <wx/choice.h>
72#include <wx/hyperlink.h>
73
74#include "invoke_pcb_dialog.h"
75
76using namespace std::placeholders;
77
78BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, PCB_BASE_FRAME )
79 // Window events
82
85
86 // Toolbar events
89
92
93 // listbox events
96
97END_EVENT_TABLE()
98
99
101 PCB_BASE_FRAME( aKiway, aParent, FRAME_FOOTPRINT_VIEWER, _( "Footprint Library Browser" ),
102 wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE,
104 m_comp( LIB_ID(), wxEmptyString, wxEmptyString, KIID_PATH(), {} )
105{
106 m_aboutTitle = _HKI( "KiCad Footprint Library Browser" );
107
108 // Force the items to always snap
109 m_magneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;
110 m_magneticItems.tracks = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;
111 m_magneticItems.graphics = true;
112
113 // Force the frame name used in config. the footprint viewer frame has a name
114 // depending on aFrameType (needed to identify the frame by wxWidgets),
115 // but only one configuration is preferable.
116 m_configName = FOOTPRINT_VIEWER_FRAME_NAME;
117
118 // Give an icon
119 wxIcon icon;
120 icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_footprint_browser ) );
121 SetIcon( icon );
122
123 m_libListWidth = 200;
124 m_fpListWidth = 300;
125
126 wxPanel* libPanel = new wxPanel( this );
127 wxSizer* libSizer = new wxBoxSizer( wxVERTICAL );
128
129 m_libFilter = new wxSearchCtrl( libPanel, ID_MODVIEW_LIB_FILTER, wxEmptyString,
130 wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
131 m_libFilter->SetDescriptiveText( _( "Filter" ) );
132 libSizer->Add( m_libFilter, 0, wxEXPAND, 5 );
133
134 m_libList = new WX_LISTBOX( libPanel, ID_MODVIEW_LIB_LIST, wxDefaultPosition, wxDefaultSize,
135 0, nullptr, wxLB_HSCROLL | wxNO_BORDER );
136 libSizer->Add( m_libList, 1, wxEXPAND, 5 );
137
138 libPanel->SetSizer( libSizer );
139 libPanel->Fit();
140
141 wxPanel* fpPanel = new wxPanel( this );
142 wxSizer* fpSizer = new wxBoxSizer( wxVERTICAL );
143
144 m_fpFilter = new wxSearchCtrl( fpPanel, ID_MODVIEW_FOOTPRINT_FILTER, wxEmptyString,
145 wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
146 m_fpFilter->SetDescriptiveText( _( "Filter" ) );
147 m_fpFilter->SetToolTip(
148 _( "Filter on footprint name, keywords, description and pad count.\n"
149 "Search terms are separated by spaces. All search terms must match.\n"
150 "A term which is a number will also match against the pad count." ) );
151 fpSizer->Add( m_fpFilter, 0, wxEXPAND, 5 );
152
153#ifdef __WXGTK__
154 // wxSearchCtrl vertical height is not calculated correctly on some GTK setups
155 // See https://gitlab.com/kicad/code/kicad/-/issues/9019
156 m_libFilter->SetMinSize( wxSize( -1, GetTextExtent( wxT( "qb" ) ).y + 10 ) );
157 m_fpFilter->SetMinSize( wxSize( -1, GetTextExtent( wxT( "qb" ) ).y + 10 ) );
158#endif
159
160 m_fpList = new WX_LISTBOX( fpPanel, ID_MODVIEW_FOOTPRINT_LIST, wxDefaultPosition, wxDefaultSize,
161 0, nullptr, wxLB_HSCROLL | wxNO_BORDER );
162
163 m_fpList->Connect( wxEVT_LEFT_DCLICK,
165 nullptr, this );
166 fpSizer->Add( m_fpList, 1, wxEXPAND, 5 );
167
168 fpPanel->SetSizer( fpSizer );
169 fpPanel->Fit();
170
171 // Create GAL canvas
172 m_canvasType = loadCanvasTypeSetting();
173
174 PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize,
175 GetGalDisplayOptions(), m_canvasType );
176 SetCanvas( drawPanel );
177
178 SetBoard( new BOARD() );
179
180 // This board will only be used to hold a footprint for viewing
181 GetBoard()->SetBoardUse( BOARD_USE::FPHOLDER );
182
183 // In viewer, the default net clearance is not known (it depends on the actual board).
184 // So we do not show the default clearance, by setting it to 0
185 // The footprint or pad specific clearance will be shown
186 GetBoard()->GetDesignSettings().m_NetSettings->GetDefaultNetclass()->SetClearance( 0 );
187
188 // Don't show the default board solder mask clearance in the footprint viewer. Only the
189 // footprint or pad clearance setting should be shown if it is not 0.
190 GetBoard()->GetDesignSettings().m_SolderMaskExpansion = 0;
191
192 // Ensure all layers and items are visible:
193 GetBoard()->SetVisibleAlls();
194 SetScreen( new PCB_SCREEN( GetPageSizeIU() ) );
195
196 GetScreen()->m_Center = true; // Center coordinate origins on screen.
197 LoadSettings( config() );
198 GetGalDisplayOptions().m_axesEnabled = true;
199
200 // Create the manager and dispatcher & route draw panel events to the dispatcher
201 m_toolManager = new TOOL_MANAGER;
202 m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(),
203 drawPanel->GetViewControls(), config(), this );
204 m_actions = new PCB_ACTIONS();
205 m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
206 drawPanel->SetEventDispatcher( m_toolDispatcher );
207
208 m_toolManager->RegisterTool( new PCB_CONTROL );
209 m_toolManager->RegisterTool( new PCB_SELECTION_TOOL );
210 m_toolManager->RegisterTool( new COMMON_TOOLS ); // for std context menus (zoom & grid)
211 m_toolManager->RegisterTool( new COMMON_CONTROL );
212 m_toolManager->RegisterTool( new PCB_PICKER_TOOL ); // for setting grid origin
213 m_toolManager->RegisterTool( new ZOOM_TOOL );
214 m_toolManager->RegisterTool( new PCB_VIEWER_TOOLS );
215
216 m_toolManager->GetTool<PCB_VIEWER_TOOLS>()->SetFootprintFrame( true );
217
218 m_toolManager->InitTools();
219 m_toolManager->InvokeTool( "common.InteractiveSelection" );
220
221 setupUIConditions();
222
223 m_toolbarSettings = GetToolbarSettings<FOOTPRINT_VIEWER_TOOLBAR_SETTINGS>( "fpviewer-toolbars" );
224 configureToolbars();
225 RecreateToolbars();
226 ReCreateMenuBar();
227
228 ReCreateLibraryList();
229 UpdateTitle();
230
231 // Call resolveCanvasType after loading settings:
232 resolveCanvasType();
233
234 // If a footprint was previously loaded, reload it
235 if( getCurNickname().size() && getCurFootprintName().size() )
236 {
237 LIB_ID id;
238
239 id.SetLibNickname( getCurNickname() );
240 id.SetLibItemName( getCurFootprintName() );
241
242 FOOTPRINT* footprint = LoadFootprint( id );
243
244 if( footprint )
245 {
246 GetBoard()->Add( footprint );
247 setFPWatcher( footprint );
248
249 m_toolManager->RunAction( PCB_ACTIONS::rehatchShapes );
250 }
251 }
252
253 drawPanel->DisplayBoard( m_pcb );
254
255 m_auimgr.SetManagedWindow( this );
256
257 // Horizontal items; layers 4 - 6
258 m_auimgr.AddPane( m_tbTopMain, EDA_PANE().VToolbar().Name( "TopMainToolbar" ).Top().Layer(6) );
259 m_auimgr.AddPane( m_tbLeft, EDA_PANE().VToolbar().Name( "LeftToolbar" ).Left().Layer(3) );
260 m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
261
262 // Vertical items; layers 1 - 3
263 m_auimgr.AddPane( libPanel, EDA_PANE().Palette().Name( "Libraries" ).Left().Layer(2)
264 .CaptionVisible( false ).MinSize( 100, -1 ).BestSize( 200, -1 ) );
265 m_auimgr.AddPane( fpPanel, EDA_PANE().Palette().Name( "Footprints" ).Left().Layer(1)
266 .CaptionVisible( false ).MinSize( 100, -1 ).BestSize( 300, -1 ) );
267
268 m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
269
270 // after changing something to the aui manager call Update() to reflect the changes
271 m_auimgr.Update();
272
273 if( m_libListWidth > 0 )
274 SetAuiPaneSize( m_auimgr, m_auimgr.GetPane( "Libraries" ), m_libListWidth, -1 );
275
276 if( m_fpListWidth > 0 )
277 SetAuiPaneSize( m_auimgr, m_auimgr.GetPane( "Footprints" ), m_fpListWidth, -1 );
278
279 // The canvas should not steal the focus from the list boxes
280 GetCanvas()->SetCanFocus( false );
281 GetCanvas()->GetGAL()->SetAxesEnabled( true );
282 ActivateGalCanvas();
283
284 // Restore last zoom and auto zoom option. (If auto-zooming we'll adjust when we load the footprint.)
285 if( PCBNEW_SETTINGS* cfg = GetPcbNewSettings() )
286 GetCanvas()->GetView()->SetScale( cfg->m_FootprintViewerZoom );
287
288 updateView();
289 setupUnits( config() );
290
291 ReCreateFootprintList();
292 Raise(); // On some window managers, this is needed
293 Show( true );
294}
295
296
298{
299 // Shutdown all running tools
300 if( m_toolManager )
301 m_toolManager->ShutdownAllTools();
302
304 GetCanvas()->GetView()->Clear();
305 // Be sure any event cannot be fired after frame deletion:
306 GetCanvas()->SetEvtHandlerEnabled( false );
307 m_fpList->Disconnect( wxEVT_LEFT_DCLICK,
309 nullptr, this );
310 setFPWatcher( nullptr );
311}
312
313
318
319
321{
323
324 if( FOOTPRINT* fp = static_cast<FOOTPRINT*>( GetModel() ) )
325 {
326 std::vector<MSG_PANEL_ITEM> msgItems;
327 fp->GetMsgPanelInfo( this, msgItems );
328 SetMsgPanel( msgItems );
329 }
330}
331
332
334{
336
337 ACTION_MANAGER* mgr = m_toolManager->GetActionManager();
338 PCB_EDITOR_CONDITIONS cond( this );
339
340 wxASSERT( mgr );
341
342 auto addToBoardCond =
343 [this]( const SELECTION& )
344 {
345 return ( GetBoard()->GetFirstFootprint() != nullptr );
346 };
347
348#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
349#define CHECK( x ) ACTION_CONDITIONS().Check( x )
350
355
356 mgr->SetConditions( PCB_ACTIONS::saveFpToBoard, ENABLE( addToBoardCond ) );
357
364
370
372
373#undef ENABLE
374#undef CHECK
375}
376
377
379{
380 // A workaround to avoid flicker, in modal mode when modview frame is destroyed,
381 // when the aui toolbar is not docked (i.e. shown in a miniframe)
382 // (useful on windows only)
383 m_tbTopMain->SetFocus();
384
386
387 Destroy();
388}
389
390
391void FOOTPRINT_VIEWER_FRAME::OnSize( wxSizeEvent& SizeEv )
392{
393 if( m_auimgr.GetManagedWindow() )
394 m_auimgr.Update();
395
396 SizeEv.Skip();
397}
398
399
401{
402 m_libList->Clear();
403
406 std::vector<wxString> nicknames = PROJECT_PCB::FootprintLibAdapter( &Prj() )->GetLibraryNames();
407 std::vector<wxString> pinnedMatches;
408 std::vector<wxString> otherMatches;
409
410 auto process =
411 [&]( const wxString& aNickname )
412 {
413 if( alg::contains( project.m_PinnedFootprintLibs, aNickname )
414 || alg::contains( cfg->m_Session.pinned_fp_libs, aNickname ) )
415 {
416 pinnedMatches.push_back( aNickname );
417 }
418 else
419 {
420 otherMatches.push_back( aNickname );
421 }
422 };
423
424 if( m_libFilter->GetValue().IsEmpty() )
425 {
426 for( const wxString& nickname : nicknames )
427 process( nickname );
428 }
429 else
430 {
431 wxStringTokenizer tokenizer( m_libFilter->GetValue(), " \t\r\n", wxTOKEN_STRTOK );
432
433 while( tokenizer.HasMoreTokens() )
434 {
435 const wxString term = tokenizer.GetNextToken().Lower();
436 EDA_COMBINED_MATCHER matcher( term, CTX_LIBITEM );
437
438 for( const wxString& nickname : nicknames )
439 {
440 if( matcher.Find( nickname.Lower() ) )
441 process( nickname );
442 }
443 }
444 }
445
446 for( const wxString& nickname : pinnedMatches )
448
449 for( const wxString& nickname : otherMatches )
450 m_libList->Append( nickname );
451
452 // Search for a previous selection:
453 int index = m_libList->FindString( getCurNickname(), true );
454
455 if( index == wxNOT_FOUND )
456 {
457 if( m_libList->GetCount() > 0 )
458 {
459 m_libList->SetSelection( 0 );
460 wxCommandEvent dummy;
462 }
463 else
464 {
465 setCurNickname( wxEmptyString );
466 setCurFootprintName( wxEmptyString );
467 }
468 }
469 else
470 {
471 m_libList->SetSelection( index, true );
472 wxCommandEvent dummy;
474 }
475
476 GetCanvas()->Refresh();
477}
478
479
481{
482 m_fpList->Clear();
483
484 if( !getCurNickname() )
485 setCurFootprintName( wxEmptyString );
486
488 wxString nickname = getCurNickname();
489
490 if( !nickname )
491 return;
492
493 std::vector<FOOTPRINT*> footprints = adapter->GetFootprints( nickname, true );
494
495 if( footprints.empty() )
496 return;
497
498 std::set<wxString> excludes;
499
500 if( !m_fpFilter->GetValue().IsEmpty() )
501 {
502 wxStringTokenizer tokenizer( m_fpFilter->GetValue(), " \t\r\n", wxTOKEN_STRTOK );
503
504 while( tokenizer.HasMoreTokens() )
505 {
506 const wxString filterTerm = tokenizer.GetNextToken().Lower();
507 EDA_COMBINED_MATCHER matcher( filterTerm, CTX_LIBITEM );
508
509 for( FOOTPRINT* footprint : footprints )
510 {
511 int matched = matcher.ScoreTerms( footprint->GetSearchTerms() );
512
513 if( filterTerm.IsNumber() && wxAtoi( filterTerm ) == (int)footprint->GetPadCount( DO_NOT_INCLUDE_NPTH ) )
514 matched++;
515
516 if( !matched )
517 excludes.insert( footprint->GetFPID().GetLibItemName() );
518 }
519 }
520 }
521
522 for( FOOTPRINT* footprint : footprints )
523 {
524 wxString fpName = footprint->GetFPID().GetLibItemName();
525
526 if( !excludes.count( fpName ) )
527 m_fpList->Append( fpName );
528 }
529
530 int index = wxNOT_FOUND;
531
532 if( !getCurFootprintName().IsEmpty() )
533 index = m_fpList->FindString( getCurFootprintName(), true );
534
535 if( index == wxNOT_FOUND )
536 {
537 if( m_fpList->GetCount() > 0 )
538 {
539 m_fpList->SetSelection( 0 );
540 m_fpList->EnsureVisible( 0 );
541
542 wxCommandEvent dummy;
544 }
545 else
546 {
547 setCurFootprintName( wxEmptyString );
548 }
549 }
550 else
551 {
552 m_fpList->SetSelection( index, true );
553 m_fpList->EnsureVisible( index );
554
555 wxCommandEvent dummy;
557 }
558}
559
560
561void FOOTPRINT_VIEWER_FRAME::OnLibFilter( wxCommandEvent& aEvent )
562{
564
565 // Required to avoid interaction with SetHint()
566 // See documentation for wxTextEntry::SetHint
567 aEvent.Skip();
568}
569
570
571void FOOTPRINT_VIEWER_FRAME::OnFPFilter( wxCommandEvent& aEvent )
572{
574
575 // Required to avoid interaction with SetHint()
576 // See documentation for wxTextEntry::SetHint
577 aEvent.Skip();
578}
579
580
581void FOOTPRINT_VIEWER_FRAME::OnCharHook( wxKeyEvent& aEvent )
582{
583 if( aEvent.GetKeyCode() == WXK_UP )
584 {
585 if( m_libFilter->HasFocus() || m_libList->HasFocus() )
587 else
589 }
590 else if( aEvent.GetKeyCode() == WXK_DOWN )
591 {
592 if( m_libFilter->HasFocus() || m_libList->HasFocus() )
594 else
596 }
597 else if( aEvent.GetKeyCode() == WXK_TAB && m_libFilter->HasFocus() )
598 {
599 if( !aEvent.ShiftDown() )
600 m_fpFilter->SetFocus();
601 else
602 aEvent.Skip();
603 }
604 else if( aEvent.GetKeyCode() == WXK_TAB && m_fpFilter->HasFocus() )
605 {
606 if( aEvent.ShiftDown() )
607 m_libFilter->SetFocus();
608 else
609 aEvent.Skip();
610 }
611 else if( ( aEvent.GetKeyCode() == WXK_RETURN || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
612 && m_fpList->GetSelection() >= 0 )
613 {
615 }
616 else
617 {
618 aEvent.Skip();
619 }
620}
621
622
624{
625 int prev = aListBox->GetSelection() - 1;
626
627 if( prev >= 0 )
628 {
629 aListBox->SetSelection( prev );
630 aListBox->EnsureVisible( prev );
631
632 wxCommandEvent dummy;
633
634 if( aListBox == m_libList )
636 else
638 }
639}
640
641
643{
644 int next = aListBox->GetSelection() + 1;
645
646 if( next < (int)aListBox->GetCount() )
647 {
648 aListBox->SetSelection( next );
649 aListBox->EnsureVisible( next );
650
651 wxCommandEvent dummy;
652
653 if( aListBox == m_libList )
655 else
657 }
658}
659
660
661void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& aEvent )
662{
663 int ii = m_libList->GetSelection();
664
665 if( ii < 0 )
666 return;
667
668 wxString name = m_libList->GetBaseString( ii );
669
670 if( getCurNickname() == name )
671 return;
672
674
675 // Ensure the displayed footprint is loade/reloaded from the new library
676 setCurFootprintName( wxEmptyString );
677
679 UpdateTitle();
680}
681
682
684{
685 if( m_fpList->GetCount() == 0 )
686 return;
687
688 int ii = m_fpList->GetSelection();
689
690 if( ii < 0 )
691 return;
692
693 wxString name = m_fpList->GetBaseString( ii );
694
695 if( getCurFootprintName().CmpNoCase( name ) != 0 )
696 {
699 }
700}
701
702
704{
705 for( PAD* pad : aFootprint->Pads() )
706 {
707 const COMPONENT_NET& net = m_comp.GetNet( pad->GetNumber() );
708
709 if( !net.GetPinFunction().IsEmpty() )
710 {
711 NETINFO_ITEM* netinfo = new NETINFO_ITEM( GetBoard() );
712 netinfo->SetNetname( net.GetPinFunction() );
713 GetBoard()->Add( netinfo );
714 pad->SetNet( netinfo );
715 }
716 }
717
718 GetBoard()->Add( aFootprint );
719
721}
722
723
725{
727}
728
729
731{
732 if( GetBoard()->GetFirstFootprint() )
733 {
734 PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
735
736 if( pcbframe == nullptr ) // happens when the board editor is not active (or closed)
737 {
738 DisplayErrorMessage( this, _( "No board currently open." ) );
739 return;
740 }
741
742 PCBNEW_SETTINGS* cfg = pcbframe->GetPcbNewSettings();
743 TOOL_MANAGER* toolMgr = pcbframe->GetToolManager();
744
746 {
747 DisplayError( this, _( "Previous footprint placement still in progress." ) );
748 return;
749 }
750
751 wxWindow* blocking_dialog = pcbframe->Kiway().GetBlockingDialog();
752
753 if( blocking_dialog )
754 blocking_dialog->Close( true );
755
757 BOARD_COMMIT commit( pcbframe );
758
759 // Create the "new" footprint
761 newFootprint->SetParent( pcbframe->GetBoard() );
762 newFootprint->SetLink( niluuid );
763 newFootprint->SetFlags(IS_NEW ); // whatever
764
765 for( PAD* pad : newFootprint->Pads() )
766 {
767 // Set the pads ratsnest settings to the global settings
768 pad->SetLocalRatsnestVisible( cfg->m_Display.m_ShowGlobalRatsnest );
769
770 // Pads in the library all have orphaned nets. Replace with Default.
771 pad->SetNetCode( 0 );
772 }
773
774 // Put it on FRONT layer,
775 // (Can be stored flipped if the lib is an archive built from a board)
776 if( newFootprint->IsFlipped() )
777 newFootprint->Flip( newFootprint->GetPosition(), cfg->m_FlipDirection );
778
779 KIGFX::VIEW_CONTROLS* viewControls = pcbframe->GetCanvas()->GetViewControls();
780 VECTOR2D cursorPos = viewControls->GetCursorPosition();
781
782 commit.Add( newFootprint );
783 viewControls->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false );
784 pcbframe->PlaceFootprint( newFootprint );
785
786 newFootprint->SetPosition( VECTOR2I( 0, 0 ) );
787 viewControls->SetCrossHairCursorPosition( cursorPos, false );
788 commit.Push( _( "Insert Footprint" ) );
789
790 pcbframe->Raise();
791 toolMgr->PostAction( PCB_ACTIONS::placeFootprint, newFootprint );
792
793 newFootprint->ClearFlags();
794 }
795}
796
797
799{
800 if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg ) )
801 {
802 // We don't allow people to change this right now, so make sure it's on
804
806
807 // Fetch display and grid settings from Footprint Editor
809 {
810 m_displayOptions = fpedit->m_Display;
811 GetGalDisplayOptions().ReadWindowSettings( fpedit->m_Window );
812 }
813
814 m_libListWidth = cfg->m_FootprintViewerLibListWidth;
815 m_fpListWidth = cfg->m_FootprintViewerFPListWidth;
816
817 // Set parameters to a reasonable value.
818 int maxWidth = cfg->m_FootprintViewer.state.size_x - 80;
819
820 if( m_libListWidth + m_fpListWidth > maxWidth )
821 {
823 m_fpListWidth = maxWidth - m_libListWidth;
824 }
825 }
826}
827
828
830{
831 PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg );
832 wxCHECK( cfg, /*void*/ );
833
835
836 // We don't want to store anything other than the window settings
838
839 if( GetCanvas() && GetCanvas()->GetView() )
841
842 cfg->m_FootprintViewerLibListWidth = m_libList->GetSize().x;
843 cfg->m_FootprintViewerFPListWidth = m_fpList->GetSize().x;
844
845}
846
847
849{
850 if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg ) )
851 return &cfg->m_FootprintViewer;
852
853 wxFAIL_MSG( wxT( "FOOTPRINT_CHOOSER not running with PCBNEW_SETTINGS" ) );
854 return &aCfg->m_Window; // non-null fail-safe
855}
856
857
859{
861 return ::GetColorSettings( cfg ? cfg->m_ColorTheme : DEFAULT_THEME );
862}
863
864
866{
868
870
871 if( aFlags & ENVVARS_CHANGED )
873}
874
875
880
881
882void FOOTPRINT_VIEWER_FRAME::setCurNickname( const wxString& aNickname )
883{
885}
886
887
892
893
898
899
900void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
901{
902 if( event.GetActive() )
903 {
904 // Ensure we have the right library list:
905 std::vector< wxString > libNicknames = PROJECT_PCB::FootprintLibAdapter( &Prj() )->GetLibraryNames();
906 bool stale = false;
907
908 if( libNicknames.size() != m_libList->GetCount() )
909 stale = true;
910 else
911 {
912 for( unsigned ii = 0; ii < libNicknames.size(); ii++ )
913 {
914 if( libNicknames[ii] != m_libList->GetBaseString( ii ) )
915 {
916 stale = true;
917 break;
918 }
919 }
920 }
921
922 if( stale )
923 {
925 UpdateTitle();
926 }
927 }
928
929 event.Skip(); // required under wxMAC
930}
931
932
939
940
947
949{
950 switch( mail.Command() )
951 {
952 case MAIL_RELOAD_LIB:
954 break;
955
956 default:
957 break;
958 }
959}
960
961
962void FOOTPRINT_VIEWER_FRAME::Update3DView( bool aMarkDirty, bool aRefresh, const wxString* aTitle )
963{
964 wxString title = _( "3D Viewer" ) + wxT( " \u2014 " ) + getCurFootprintName();
965 PCB_BASE_FRAME::Update3DView( aMarkDirty, aRefresh, &title );
966}
967
968
973
974
976{
977 wxString title;
979
980 if( !getCurNickname().IsEmpty() )
981 {
982 if( std::optional<wxString> optUri = manager.GetFullURI( LIBRARY_TABLE_TYPE::FOOTPRINT, getCurNickname(), true ) )
983 title = getCurNickname() + wxT( " \u2014 " ) + *optUri;
984 else
985 title = _( "[no library selected]" );
986 }
987 else
988 {
989 title = _( "[no library selected]" );
990 }
991
992 title += wxT( " \u2014 " ) + _( "Footprint Library Browser" );
993
994 SetTitle( title );
995}
996
997
999{
1000 if( !getCurNickname() )
1001 return;
1002
1003 int selection = m_fpList->FindString( getCurFootprintName(), true );
1004
1005 if( aMode == FPVIEWER_CONSTANTS::NEXT_PART )
1006 {
1007 if( selection != wxNOT_FOUND && selection < (int)m_fpList->GetCount() - 1 )
1008 selection++;
1009 }
1010
1012 {
1013 if( selection != wxNOT_FOUND && selection > 0 )
1014 selection--;
1015 }
1016
1017 if( selection != wxNOT_FOUND )
1018 {
1019 m_fpList->SetSelection( selection );
1020 m_fpList->EnsureVisible( selection );
1021
1022 setCurFootprintName( m_fpList->GetBaseString( selection ) );
1023
1024 // Delete the current footprint
1025 if( PCB_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<PCB_SELECTION_TOOL>() )
1026 selectionTool->ClearSelection( true /* quiet mode */ );
1027
1029 GetBoard()->RemoveUnusedNets( nullptr );
1030
1032 getCurFootprintName(), false );
1033
1034 if( footprint )
1035 displayFootprint( footprint );
1036
1037 if( aMode != FPVIEWER_CONSTANTS::RELOAD_PART )
1038 setFPWatcher( footprint );
1039
1040 Update3DView( true, true );
1041 updateView();
1042 }
1043
1044 UpdateTitle();
1045
1046 GetCanvas()->Refresh();
1047}
1048
1049
1051{
1054
1056
1057 PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( config() );
1058 wxCHECK( cfg, /* void */ );
1059
1062 else
1064
1065
1067}
1068
1069
1070void FOOTPRINT_VIEWER_FRAME::OnExitKiCad( wxCommandEvent& event )
1071{
1072 Kiway().OnKiCadExit();
1073}
1074
1075
1077{
1078 Close( false );
1079}
1080
1081
int index
const char * name
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition bitmap.cpp:100
@ icon_footprint_browser
@ FPHOLDER
Definition board.h:364
static TOOL_ACTION toggleGrid
Definition actions.h:194
static TOOL_ACTION cursorSmallCrosshairs
Definition actions.h:148
static TOOL_ACTION toggleBoundingBoxes
Definition actions.h:153
static TOOL_ACTION centerContents
Definition actions.h:145
static TOOL_ACTION measureTool
Definition actions.h:248
static TOOL_ACTION selectionTool
Definition actions.h:247
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION zoomTool
Definition actions.h:142
static TOOL_ACTION selectionClear
Clear the current selection.
Definition actions.h:220
static TOOL_ACTION cursor45Crosshairs
Definition actions.h:150
static TOOL_ACTION cursorFullCrosshairs
Definition actions.h:149
Manage TOOL_ACTION objects.
void SetConditions(const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
Set the conditions the UI elements for activating a specific tool action should use for determining t...
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
WINDOW_SETTINGS m_Window
wxString m_ColorTheme
Active color theme name.
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
Handle actions specific to the board editor in PcbNew.
bool PlacingFootprint() const
Re-entrancy checker for above.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition board.cpp:1295
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Definition board.h:587
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
Definition board.h:1091
void DeleteAllFootprints()
Remove all footprints from the deque and free the memory associated with them.
Definition board.cpp:1822
Color settings are a bit different than most of the settings objects in that there can be more than o...
COLOR4D GetColor(int aLayer) const
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
Definition commit.h:74
Handle actions that are shared between different applications.
Handles action that are shared between different applications.
Used to store the component pin name to net name (and pin function) associations stored in a netlist.
const wxString & GetPinFunction() const
virtual APP_SETTINGS_BASE * config() const
Return the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
virtual void setupUIConditions()
Setup the UI conditions for the various actions and their controls in this frame.
wxAuiManager m_auimgr
ACTION_TOOLBAR * m_tbTopMain
int ScoreTerms(std::vector< SEARCH_TERM > &aWeightedTerms, bool *aExactMatch=nullptr)
bool Find(const wxString &aTerm, int &aMatchersTriggered, int &aPosition)
Look in all existing matchers, return the earliest match of any of the existing.
void OnSelectGrid(wxCommandEvent &event)
Command event handler for selecting grid sizes.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void OnSelectZoom(wxCommandEvent &event)
Set the zoom factor when selected by the zoom list box in the main tool bar.
GAL_DISPLAY_OPTIONS_IMPL & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
virtual void UpdateMsgPanel()
Redraw the message panel.
void StopDrawing()
Prevent the GAL canvas from further drawing until it is recreated or StartDrawing() is called.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
void ForceRefresh()
Force a redraw.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition eda_item.h:152
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition eda_item.h:154
virtual void SetParent(EDA_ITEM *aParent)
Definition eda_item.cpp:89
Specialization of the wxAuiPaneInfo class for KiCad panels.
SELECTION_CONDITION BoundingBoxes()
SELECTION_CONDITION CurrentTool(const TOOL_ACTION &aTool)
Create a functor testing if the specified tool is the current active tool in the frame.
SELECTION_CONDITION CursorSmallCrosshairs()
Create a functor testing if the cursor is full screen in a frame.
SELECTION_CONDITION GridVisible()
Create a functor testing if the grid is visible in a frame.
SELECTION_CONDITION Cursor45Crosshairs()
SELECTION_CONDITION CursorFullCrosshairs()
An interface to the global shared library manager that is schematic-specific and linked to one projec...
std::vector< FOOTPRINT * > GetFootprints(const wxString &aNickname, bool aBestEfforts=false)
Retrieves a list of footprints contained in a given loaded library.
FOOTPRINT * LoadFootprint(const wxString &aNickname, const wxString &aName, bool aKeepUUID)
Load a FOOTPRINT having aName from the library given by aNickname.
Component library viewer main window.
void displayFootprint(FOOTPRINT *aFootprint)
BOARD_ITEM_CONTAINER * GetModel() const override
void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr) override
Update the 3D view, if the viewer is opened by this frame.
void OnLibFilter(wxCommandEvent &aEvent)
void DClickOnFootprintList(wxMouseEvent &aEvent)
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Return a pointer to the window settings for this frame.
void OnCharHook(wxKeyEvent &aEvent) override
Capture the key event before it is sent to the GUI.
void selectPrev(WX_LISTBOX *aListBox)
void ReCreateLibraryList()
Create or recreate the list of current loaded libraries.
void CloseFootprintViewer(wxCommandEvent &event)
void KiwayMailIn(KIWAY_MAIL_EVENT &mail) override
Receive #KIWAY_ROUTED_EVENT messages from other players.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
FOOTPRINT_VIEWER_FRAME(KIWAY *aKiway, wxWindow *aParent)
void ReloadFootprint(FOOTPRINT *aFootprint) override
Override from PCB_BASE_FRAME which reloads the footprint from the library without setting the footpri...
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void HardRedraw() override
Rebuild the GAL and redraws the screen.
virtual COLOR4D GetGridColor() override
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
void AddFootprintToPCB()
Export the current footprint name and close the library browser.
void OnActivate(wxActivateEvent &event)
Called when the frame frame is activate to reload the libraries and component lists that can be chang...
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void setCurFootprintName(const wxString &aName)
void OnSize(wxSizeEvent &event) override
Recalculate the size of toolbars and display panel when the frame size changes.
void OnExitKiCad(wxCommandEvent &event)
void setCurNickname(const wxString &aNickname)
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void OnFPFilter(wxCommandEvent &aEvent)
void UpdateMsgPanel() override
Redraw the message panel.
void UpdateTitle()
Update the window title with current library information.
void SelectAndViewFootprint(FPVIEWER_CONSTANTS aMode)
Select and load the next or the previous footprint.
void selectNext(WX_LISTBOX *aListBox)
void ClickOnLibList(wxCommandEvent &aEvent)
void ClickOnFootprintList(wxCommandEvent &aEvent)
void SetPosition(const VECTOR2I &aPos) override
void SetLink(const KIID &aLink)
Definition footprint.h:1176
unsigned GetPadCount(INCLUDE_NPTH_T aIncludeNPTH=INCLUDE_NPTH_T(INCLUDE_NPTH)) const
Return the number of pads.
std::vector< SEARCH_TERM > & GetSearchTerms() override
std::deque< PAD * > & Pads()
Definition footprint.h:375
bool IsFlipped() const
Definition footprint.h:614
const LIB_ID & GetFPID() const
Definition footprint.h:441
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
BOARD_ITEM * Duplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const override
Create a copy of this BOARD_ITEM.
VECTOR2I GetPosition() const override
Definition footprint.h:403
void ReadWindowSettings(WINDOW_SETTINGS &aCfg)
Read GAL config options from application-level config.
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
bool m_axesEnabled
Crosshair drawing mode.
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
double GetScale() const
Definition view.h:281
void Clear()
Remove all items from the view.
Definition view.cpp:1218
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition kiway_mail.h:34
MAIL_T Command()
Returns the MAIL_T associated with this mail.
Definition kiway_mail.h:44
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:311
void OnKiCadExit()
Definition kiway.cpp:796
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
Definition kiway.cpp:398
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
Definition kiway.cpp:686
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition kiway.cpp:201
std::vector< wxString > GetLibraryNames() const
Returns a list of library nicknames that are available (skips any that failed to load)
std::optional< wxString > GetFullURI(LIBRARY_TABLE_TYPE aType, const wxString &aNickname, bool aSubstituted=false)
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
int SetLibNickname(const UTF8 &aLibNickname)
Override the logical library name portion of the LIB_ID to aLibNickname.
Definition lib_id.cpp:96
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
static const wxString GetPinningSymbol()
Handle the data for a net.
Definition netinfo.h:46
void SetNetname(const wxString &aNewName)
Set the long netname to aNetName, the short netname to the last token in the long netname's path,...
Definition pad.h:61
DISPLAY_OPTIONS m_Display
FLIP_DIRECTION m_FlipDirection
Gather all the actions that are shared by tools.
Definition pcb_actions.h:47
static TOOL_ACTION padDisplayMode
static TOOL_ACTION rehatchShapes
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION fpAutoZoom
static TOOL_ACTION textOutlines
Display texts as lines.
static TOOL_ACTION showPadNumbers
static TOOL_ACTION placeFootprint
static TOOL_ACTION saveFpToBoard
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void setFPWatcher(FOOTPRINT *aFootprint)
Create or removes a watcher on the specified footprint.
PCBNEW_SETTINGS * GetPcbNewSettings() const
PCB_BASE_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
BOARD * GetBoard() const
PCB_DISPLAY_OPTIONS m_displayOptions
void PlaceFootprint(FOOTPRINT *aFootprint, bool aRecreateRatsnest=true, std::optional< VECTOR2I > aPosition=std::nullopt)
Place aFootprint at the current cursor position (or provided one) and updates footprint coordinates w...
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
Handle actions that are shared between different frames in PcbNew.
Definition pcb_control.h:43
void UpdateColors()
Update the color settings in the painter and GAL.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void DisplayBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Add all items from the current board to the VIEW, so they can be displayed by GAL.
Group generic conditions for PCB editor states.
SELECTION_CONDITION PadFillDisplay()
Create a functor that tests if the frame fills the pads.
SELECTION_CONDITION GraphicsFillDisplay()
Create a functor that tests if the frame fills graphics items.
SELECTION_CONDITION FootprintViewerAutoZoom()
Create a functor that tests if the footprint viewer should auto zoom on new footprints.
SELECTION_CONDITION PadNumbersDisplay()
Create a functor that tests if the pad numbers are displayed.
SELECTION_CONDITION TextFillDisplay()
Create a functor that tests if the frame fills text items.
The main frame for Pcbnew.
Generic tool for picking an item.
The selection tool: currently supports:
bool m_FootprintViewerAutoZoomOnSelect
true to use automatic zoom on fp selection
double m_FootprintViewerZoom
The last zoom level used (0 for auto)
Tool useful for viewing footprints.
virtual COMMON_SETTINGS * GetCommonSettings() const
Definition pgm_base.cpp:528
virtual LIBRARY_MANAGER & GetLibraryManager() const
Definition pgm_base.h:126
The backing store for a PROJECT, in JSON format.
static FOOTPRINT_LIBRARY_ADAPTER * FootprintLibAdapter(PROJECT *aProject)
@ PCB_FOOTPRINT_VIEWER_FP_NAME
Definition project.h:229
@ PCB_FOOTPRINT_VIEWER_LIB_NICKNAME
Definition project.h:230
virtual PROJECT_FILE & GetProjectFile() const
Definition project.h:200
virtual void SetRString(RSTRING_T aStringId, const wxString &aString)
Store a "retained string", which is any session and project specific string identified in enum RSTRIN...
Definition project.cpp:355
virtual const wxString & GetRString(RSTRING_T aStringId)
Return a "retained string", which is any session and project specific string identified in enum RSTRI...
Definition project.cpp:366
TOOL_MANAGER * m_toolManager
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
@ MODEL_RELOAD
Model changes (the sheet for a schematic)
Definition tool_base.h:76
Master controller class:
bool RunAction(const std::string &aActionName, T aParam)
Run the specified action immediately, pausing the current action to run the new one.
bool PostAction(const std::string &aActionName, T aParam)
Run the specified action after the current action (coroutine) ends.
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, APP_SETTINGS_BASE *aSettings, TOOLS_HOLDER *aFrame)
Set the work environment (model, view, view controls and the parent window).
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:217
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
Definition confirm.cpp:192
This file is part of the common library.
#define CHECK(x)
#define ENABLE(x)
#define _(s)
Declaration of the eda_3d_viewer class.
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define FOOTPRINT_VIEWER_FRAME_NAME
#define IGNORE_PARENT_GROUP
Definition eda_item.h:53
#define IS_NEW
New item, just created.
Abstract pattern-matching tool and implementations.
@ CTX_LIBITEM
@ DO_NOT_INCLUDE_NPTH
Definition footprint.h:72
@ FRAME_PCB_EDITOR
Definition frame_type.h:38
@ FRAME_FOOTPRINT_VIEWER
Definition frame_type.h:41
@ ID_ON_GRID_SELECT
Definition id.h:112
@ ID_ON_ZOOM_SELECT
Definition id.h:111
PROJECT & Prj()
Definition kicad.cpp:730
EVT_MENU(ID_COMPARE_PROJECT_BRANCHES, KICAD_MANAGER_FRAME::OnCompareProjectBranches) KICAD_MANAGER_FRAME
KIID niluuid(0)
@ LAYER_GRID
Definition layer_ids.h:250
@ MAIL_RELOAD_LIB
Definition mail_type.h:54
Message panel definition file.
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
Definition kicad_algo.h:96
#define _HKI(x)
Definition page_info.cpp:40
@ ID_MODVIEW_FOOTPRINT_LIST
Definition pcbnew_id.h:86
@ ID_MODVIEW_FOOTPRINT_FILTER
Definition pcbnew_id.h:85
@ ID_MODVIEW_LIB_FILTER
Definition pcbnew_id.h:83
@ ID_MODVIEW_LIB_LIST
Definition pcbnew_id.h:84
static PGM_BASE * process
PGM_BASE & Pgm()
The global program "get" accessor.
see class PGM_BASE
CITER next(CITER it)
Definition ptree.cpp:120
#define DEFAULT_THEME
T * GetToolbarSettings(const wxString &aFilename)
T * GetAppSettings(const char *aFilename)
KIWAY Kiway(KFCTL_STANDALONE)
std::vector< FAB_LAYER_COLOR > dummy
std::vector< wxString > pinned_fp_libs
Store the common settings that are saved and loaded for each window / frame.
CURSOR_SETTINGS cursor
#define ENVVARS_CHANGED
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
VECTOR2< double > VECTOR2D
Definition vector2d.h:682
Definition of file extensions used in Kicad.
void SetAuiPaneSize(wxAuiManager &aManager, wxAuiPaneInfo &aPane, int aWidth, int aHeight)
Sets the size of an AUI pane, working around http://trac.wxwidgets.org/ticket/13180.