KiCad PCB EDA Suite
display_footprints_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) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2007-2019 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, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <bitmaps.h>
27 #include <class_board.h>
28 #include <class_module.h>
29 #include <common.h>
30 #include <confirm.h>
31 #include <cvpcb_settings.h>
32 #include <fp_lib_table.h>
33 #include <id.h>
34 #include <lib_id.h>
35 #include <macros.h>
36 #include <msgpanel.h>
37 #include <pcb_draw_panel_gal.h>
38 #include <pcb_painter.h>
39 #include <tool/action_toolbar.h>
40 #include <tool/common_tools.h>
41 #include <tool/tool_dispatcher.h>
42 #include <tool/tool_manager.h>
43 #include <tool/zoom_tool.h>
44 #include <cvpcb_mainframe.h>
46 #include <tools/cvpcb_actions.h>
49 
50 
51 BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME )
56 END_EVENT_TABLE()
57 
58 
60  PCB_BASE_FRAME( aKiway, aParent, FRAME_CVPCB_DISPLAY, _( "Footprint Viewer" ),
61  wxDefaultPosition, wxDefaultSize,
63 {
64  // Give an icon
65  wxIcon icon;
66  icon.CopyFromBitmap( KiBitmap( icon_cvpcb_xpm ) );
67  SetIcon( icon );
68 
69  SetBoard( new BOARD() );
70  SetScreen( new PCB_SCREEN( GetPageSizeIU() ) );
71 
72  // Don't show the default board solder mask clearance. Only the
73  // footprint or pad clearance setting should be shown if it is not 0.
75 
76  LoadSettings( config() );
77 
78  // Initialize grid id to a default value if not found in config or incorrect:
79  if( !( GetScreen()->GridExists( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 ) ) )
81 
82  GetScreen()->SetGrid( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 );
83 
84  // Initialize some display options
85  auto displ_opts = GetDisplayOptions();
86  displ_opts.m_DisplayPadIsol = false; // Pad clearance has no meaning here
87 
88  // Track and via clearance has no meaning here.
89  displ_opts.m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE;
90  SetDisplayOptions( displ_opts );
91 
92  // Create GAL canvas
93 #ifdef __WXMAC__
94  // Cairo renderer doesn't handle Retina displays
96 #else
98 #endif
99  auto* gal_drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
100  GetGalDisplayOptions(), backend );
101  SetCanvas( gal_drawPanel );
102 
103  // Now all panels are created, set the window size to the latest saved in config:
104  SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
105 
106  // Create the manager and dispatcher & route draw panel events to the dispatcher
107  m_toolManager = new TOOL_MANAGER;
108  m_toolManager->SetEnvironment( GetBoard(), gal_drawPanel->GetView(),
109  gal_drawPanel->GetViewControls(), this );
110  m_actions = new CVPCB_ACTIONS();
111  m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, m_actions );
112  gal_drawPanel->SetEventDispatcher( m_toolDispatcher );
113 
114  m_toolManager->RegisterTool( new COMMON_TOOLS );
115  m_toolManager->RegisterTool( new ZOOM_TOOL );
116  m_toolManager->RegisterTool( new CVPCB_FOOTPRINT_VIEWER_CONTROL );
117  m_toolManager->RegisterTool( new CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL );
118  m_toolManager->InitTools();
119 
120  // Run the control tool, it is supposed to be always active
121  m_toolManager->InvokeTool( "cvpcb.InteractiveSelection" );
122 
123  ReCreateHToolbar();
124  ReCreateVToolbar();
125  ReCreateOptToolbar();
126 
127  m_auimgr.SetManagedWindow( this );
128 
129  m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
130  m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
131  m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
132  m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
133  m_auimgr.Update();
134 
135  auto& galOpts = GetGalDisplayOptions();
136  galOpts.m_axesEnabled = true;
137 
138  GetCanvas()->GetView()->SetScale( GetZoomLevelCoeff() / GetScreen()->GetZoom() );
139 
140  ActivateGalCanvas();
141 
142  // Restore last zoom. (If auto-zooming we'll adjust when we load the footprint.)
143  GetCanvas()->GetView()->SetScale( m_lastZoom );
144 
145  updateView();
146 
147  Show( true );
148 }
149 
150 
152 {
153  // Shutdown all running tools
154  if( m_toolManager )
156 
158  GetCanvas()->StopDrawing();
159  GetCanvas()->GetView()->Clear();
160  // Be sure any event cannot be fired after frame deletion:
161  GetCanvas()->SetEvtHandlerEnabled( false );
162 
163  delete GetScreen();
164  SetScreen( NULL ); // Be sure there is no double deletion
165 }
166 
167 
168 void DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow( wxCloseEvent& event )
169 {
170  Destroy();
171 }
172 
173 
175 {
176  // Currently, no vertical right toolbar.
177  // So do nothing
178 }
179 
180 
182 {
183  if( m_optionsToolBar )
184  return;
185 
186  // Create options tool bar.
187  m_optionsToolBar = new ACTION_TOOLBAR( this, ID_OPT_TOOLBAR, wxDefaultPosition, wxDefaultSize,
188  KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL );
189 
190  // TODO: these can be moved to the 'proper' right vertical toolbar if and when there are
191  // actual tools to put there. That, or I'll get around to implementing configurable
192  // toolbars.
195 
196  m_optionsToolBar->AddSeparator();
202 
203  m_optionsToolBar->AddSeparator();
204  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString,
206  _( "Show pads in outline mode" ), wxITEM_CHECK );
207 
210  _( "Show texts in line mode" ), wxITEM_CHECK );
211 
214  _( "Show outlines in line mode" ), wxITEM_CHECK );
215 
216  m_optionsToolBar->Realize();
217 }
218 
219 
221 {
222  if( m_mainToolBar != NULL )
223  return;
224 
225  m_mainToolBar = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
226  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
227 
228  m_mainToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, KiScaledBitmap( config_xpm, this ),
229  _( "Display options" ) );
230 
231  m_mainToolBar->AddSeparator();
237 
238  m_mainToolBar->AddSeparator();
240 
242 
243  // Grid selection choice box.
245  wxDefaultPosition, wxDefaultSize, 0, NULL );
247  m_mainToolBar->AddControl( m_gridSelectBox );
248 
250 
251  // Zoom selection choice box.
253  wxDefaultPosition, wxDefaultSize, 0, NULL );
255  m_mainToolBar->AddControl( m_zoomSelectBox );
256 
257  // after adding the buttons to the toolbar, must call Realize() to reflect
258  // the changes
259  m_mainToolBar->Realize();
260 }
261 
262 
264 {
265  auto cfg = dynamic_cast<CVPCB_SETTINGS*>( aCfg );
266  wxASSERT( cfg );
267 
269 
270  SetDisplayOptions( cfg->m_FootprintViewerDisplayOptions );
271 
272  m_autoZoom = cfg->m_FootprintViewer.auto_zoom;
273  m_lastZoom = cfg->m_FootprintViewer.zoom;
274 }
275 
276 
278 {
279  auto cfg = dynamic_cast<CVPCB_SETTINGS*>( aCfg );
280  wxASSERT( cfg );
281 
283 
284  cfg->m_FootprintViewerDisplayOptions = GetDisplayOptions();
285 
286  cfg->m_FootprintViewer.auto_zoom = m_autoZoom;
287  cfg->m_FootprintViewer.zoom = GetCanvas()->GetView()->GetScale();
288 }
289 
290 
292 {
293  auto cfg = dynamic_cast<CVPCB_SETTINGS*>( aCfg );
294  wxASSERT( cfg );
295  return &cfg->m_FootprintViewer;
296 }
297 
298 
300 {
301  auto painter = static_cast<KIGFX::PCB_PAINTER*>( GetCanvas()->GetView()->GetPainter() );
302 
303  painter->GetSettings()->LoadDisplayOptions( GetDisplayOptions(), false );
304 
306  GetCanvas()->Refresh();
307 }
308 
309 
317 {
318 }
319 
320 
322 {
323  return COLOR4D( DARKGRAY );
324 }
325 
326 
327 MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
328 {
329  MODULE* footprint = NULL;
330 
331  try
332  {
333  LIB_ID fpid;
334 
335  if( fpid.Parse( aFootprintName, LIB_ID::ID_PCB ) >= 0 )
336  {
337  DisplayInfoMessage( this, wxString::Format( _( "Footprint ID \"%s\" is not valid." ),
338  GetChars( aFootprintName ) ) );
339  return NULL;
340  }
341 
342  std::string nickname = fpid.GetLibNickname();
343  std::string fpname = fpid.GetLibItemName();
344 
345  wxLogDebug( wxT( "Load footprint \"%s\" from library \"%s\"." ),
346  fpname.c_str(), nickname.c_str() );
347 
348  footprint = Prj().PcbFootprintLibs( Kiway() )->FootprintLoad(
349  FROM_UTF8( nickname.c_str() ), FROM_UTF8( fpname.c_str() ) );
350  }
351  catch( const IO_ERROR& ioe )
352  {
353  DisplayError( this, ioe.What() );
354  return NULL;
355  }
356 
357  if( footprint )
358  {
359  footprint->SetParent( (EDA_ITEM*) GetBoard() );
360  footprint->SetPosition( wxPoint( 0, 0 ) );
361  return footprint;
362  }
363 
364  wxString msg = wxString::Format( _( "Footprint \"%s\" not found" ), aFootprintName.GetData() );
365  DisplayError( this, msg );
366  return NULL;
367 }
368 
369 
371 {
372  CVPCB_MAINFRAME* parentframe = (CVPCB_MAINFRAME *) GetParent();
373  MODULE* module = nullptr;
374  const FOOTPRINT_INFO* module_info = nullptr;
375 
377  GetCanvas()->GetView()->Clear();
378 
379  wxString footprintName = parentframe->GetSelectedFootprint();
380 
381  if( footprintName.IsEmpty() )
382  {
383  COMPONENT* comp = parentframe->GetSelectedComponent();
384 
385  if( comp )
386  footprintName = comp->GetFPID().GetUniStringLibId();
387  }
388 
389  if( !footprintName.IsEmpty() )
390  {
391  SetTitle( wxString::Format( _( "Footprint: %s" ), footprintName ) );
392 
393  module = Get_Module( footprintName );
394 
395  module_info = parentframe->m_FootprintsList->GetModuleInfo( footprintName );
396  }
397 
398  if( module )
399  GetBoard()->Add( module );
400 
401  if( module_info )
402  SetStatusText( wxString::Format( _( "Lib: %s" ), module_info->GetLibNickname() ), 0 );
403  else
404  SetStatusText( wxEmptyString, 0 );
405 
406  updateView();
407 
408  UpdateStatusBar();
409 
410  GetCanvas()->Refresh();
411  Update3DView( true );
412 }
413 
414 
416 {
417  PCB_DRAW_PANEL_GAL* dp = static_cast<PCB_DRAW_PANEL_GAL*>( GetCanvas() );
418  dp->UpdateColors();
419  dp->DisplayBoard( GetBoard() );
420 
422 
423  if( m_autoZoom )
425  else
427 
428  UpdateMsgPanel();
429 }
430 
431 
433 {
434  MODULE* footprint = GetBoard()->GetFirstModule();
435  MSG_PANEL_ITEMS items;
436 
437  if( footprint )
438  footprint->GetMsgPanelInfo( m_userUnits, items );
439 
440  SetMsgPanel( items );
441 }
442 
443 
445 {
447  m_mainToolBar->Refresh();
448 
454  m_optionsToolBar->Refresh();
455 }
456 
457 
458 /*
459  * Redraw the BOARD items but not cursors, axis or grid.
460  */
461 void BOARD::Print( PCB_BASE_FRAME* aFrame, wxDC* aDC, const wxPoint& aOffset )
462 {
463  if( !m_modules.empty() )
464  GetFirstModule()->Print( aFrame, aDC );
465 }
466 
void ShutdownAllTools()
Shutdown all tools with a currently registered event loop in this tool manager by waking them up with...
MODULES m_modules
MODULES for components on the board, owned by pointer.
Definition: class_board.h:178
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:239
int m_SolderMaskMargin
Solder mask margin.
static TOOL_ACTION show3DViewer
Definition: actions.h:151
ACTION_TOOLBAR.
const UTF8 & GetLibItemName() const
Definition: lib_id.h:114
const BITMAP_OPAQUE icon_cvpcb_xpm[1]
Definition: icon_cvpcb.cpp:158
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
FOOTPRINT_LIST * m_FootprintsList
static wxString FROM_UTF8(const char *cstring)
function FROM_UTF8 converts a UTF8 encoded C string to a wxString for all wxWidgets build modes.
Definition: macros.h:62
static TOOL_ACTION zoomInCenter
Definition: actions.h:90
FOOTPRINT_INFO * GetModuleInfo(const wxString &aFootprintId)
Get info for a module by id.
virtual bool IsGridVisible() const override
Function IsGridVisible()
Model changes (required full reload)
Definition: tool_base.h:81
COLOR4D GetGridColor() override
Function GetGridColor() , virtual.
This file is part of the common library.
wxString GetLibNickname() const override
ACTION_TOOLBAR * m_optionsToolBar
virtual void SetScreen(BASE_SCREEN *aScreen)
static TOOL_ACTION zoomTool
Definition: actions.h:95
static const bool TOGGLE
void InstallOptionsDisplay(wxCommandEvent &event)
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
MODULE * FootprintLoad(const wxString &aNickname, const wxString &aFootprintName)
Function FootprintLoad.
void UpdateAllItems(int aUpdateFlags)
Updates all items in the view according to the given flags.
Definition: view.cpp:1444
void Add(const TOOL_ACTION &aAction, bool aIsToggleEntry=false)
Function Add() Adds a TOOL_ACTION-based button to the toolbar.
static TOOL_ACTION zoomFitScreen
Definition: actions.h:93
void ApplyDisplaySettingsToGAL()
Updates the GAL with display settings changes.
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Function RunAction() Runs the specified action.
Definition: tool_manager.h:139
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:512
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
MODULE * Get_Module(const wxString &CmpName)
#define FOOTPRINTVIEWER_FRAME_NAME
ACTION_TOOLBAR * m_mainToolBar
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
wxBitmap KiScaledBitmap(BITMAP_DEF aBitmap, EDA_BASE_FRAME *aWindow)
Construct a wxBitmap from a memory record, scaling it if device DPI demands it.
Definition: bitmap.cpp:116
Item needs to be redrawn.
Definition: view_item.h:61
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Function GetDisplayOptions returns the display options current in use Display options are relative to...
static TOOL_ACTION imperialUnits
Definition: actions.h:139
wxChoice * m_gridSelectBox
void updateView()
update the gal canvas (view, colors ...)
static TOOL_ACTION zoomOutCenter
Definition: actions.h:91
DISPLAY_FOOTPRINTS_FRAME is used to display footprints.
void OnCloseWindow(wxCloseEvent &Event) override
This file contains miscellaneous commonly used macros and functions.
CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL.
const LIB_ID & GetFPID() const
Definition: pcb_netlist.h:164
TOOL_MANAGER.
Definition: tool_manager.h:50
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80
static TOOL_ACTION measureTool
Definition: actions.h:147
UNDO_REDO_CONTAINER is a holder to handle alist of undo (or redo) command.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Stores the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:52
static TOOL_ACTION centerContents
Definition: actions.h:96
const BITMAP_OPAQUE text_sketch_xpm[1]
Definition: text_sketch.cpp:52
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:75
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Returns a pointer to the window settings for this frame.
#define NULL
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void DisplayBoard(BOARD *aBoard)
Function DisplayBoard adds all items from the current board to the VIEW, so they can be displayed by ...
void SetParent(EDA_ITEM *aParent)
Definition: base_struct.h:218
void Clear()
Function Clear() Removes all items from the view.
Definition: view.cpp:1111
static TOOL_ACTION toggleGrid
Definition: actions.h:135
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxChoice * m_zoomSelectBox
static TOOL_ACTION togglePolarCoords
Definition: actions.h:142
MODULE * GetFirstModule() const
Gets the first module in the list (used in footprint viewer/editor) or NULL if none.
Definition: class_board.h:283
void ResetTools(TOOL_BASE::RESET_REASON aReason)
Function ResetTools() Resets all tools (i.e.
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the s...
Definition: kiway.h:273
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
#define KICAD_DEFAULT_DRAWFRAME_STYLE
CVPCB_ACTIONS.
Definition: cvpcb_actions.h:40
void SyncToolbars() override
Update the toolbars (mostly settings/check buttons/checkboxes) with the current controller state.
void SetPosition(const wxPoint &aPos) override
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
Specialization of the wxAuiPaneInfo class for KiCad panels.
void Print(PCB_BASE_FRAME *aFrame, wxDC *aDC, const wxPoint &aOffset=ZeroOffset) override
Function Print.
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...
COMMON_TOOLS.
Definition: common_tools.h:38
void UpdateColors()
Updates the color settings in the painter and GAL.
TOOL_DISPATCHER.
void UpdateGridSelectBox()
COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:80
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
BOARD * GetBoard()
VTBL_ENTRY FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
Definition: project.cpp:427
static TOOL_ACTION metricUnits
Definition: actions.h:140
wxString GetSelectedFootprint()
void InitDisplay()
Function InitDisplay Refresh the full display for this frame: Set the title, the status line and redr...
virtual void UpdateStatusBar() override
Update the status bar information.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:101
virtual void OnSelectGrid(wxCommandEvent &event)
Command event handler for selecting grid sizes.
const BITMAP_OPAQUE pad_sketch_xpm[1]
Definition: pad_sketch.cpp:49
const BITMAP_OPAQUE show_mod_edge_xpm[1]
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:163
#define _(s)
Definition: 3d_actions.cpp:33
static TOOL_ACTION zoomRedraw
Definition: actions.h:87
COMPONENT * GetSelectedComponent()
Get the selected component from the component listbox.
void GetMsgPanelInfo(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
EDA_UNITS m_userUnits
void Toggle(const TOOL_ACTION &aAction, bool aState)
Applies the default toggle action.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, EDA_BASE_FRAME *aFrame)
Sets the work environment (model, view, view controls and the parent window).
The common library.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:102
void KiScaledSeparator(wxAuiToolBar *aToolbar, EDA_BASE_FRAME *aWindow)
Add a separator to the given toolbar scaled the same way as KiScaledBitmap.
Definition: bitmap.cpp:167
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
void DeleteAllModules()
Removes all modules from the deque and frees the memory associated with them.
Definition: class_board.h:291
CVPCB_FOOTPRINT_VIEWER_CONTROL.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
wxString GetUniStringLibId() const
Definition: lib_id.h:148
static TOOL_ACTION toggleCursorStyle
Definition: actions.h:98
TOOL_MANAGER * m_toolManager
Module description (excepted pads)
BOARD * GetBoard() const
void updateZoomSelectBox()
void Print(PCB_BASE_FRAME *aFrame, wxDC *aDC, const wxPoint &aOffset=ZeroOffset) override
Function Print Prints the footprint to the aDC.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
virtual void Update3DView(bool aForceReload, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
double GetScale() const
Function GetScale()
Definition: view.h:257
int Parse(const UTF8 &aId, LIB_ID_TYPE aType, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:122
void ClearUndoORRedoList(UNDO_REDO_CONTAINER &aList, int aItemCount=-1) override
Function ClearUndoORRedoList free the undo or redo list from List element Wrappers are deleted.
Message panel definition file.
const BITMAP_OPAQUE config_xpm[1]
Definition: config.cpp:66
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:267
bool IsCurrentTool(const TOOL_ACTION &aAction) const
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
void StopDrawing()
Function StopDrawing() Prevents the GAL canvas from further drawing till it is recreated or StartDraw...
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
static TOOL_ACTION selectionTool
Definition: actions.h:146
The CvPcb application main window.
virtual void OnSelectZoom(wxCommandEvent &event)
Set the zoom factor when selected by the zoom list box in the main tool bar.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40