KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bitmap2cmp_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) 1992-2010 jean-pierre.charras
5 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <bitmap2component.h>
26#include <bitmap2cmp_frame.h>
27#include <bitmap2cmp_panel.h>
28#include <bitmap2cmp_settings.h>
29#include <bitmap_io.h>
30#include <bitmaps.h>
31#include <common.h>
32#include <id.h>
33#include <kiface_base.h>
34#include <pgm_base.h>
35#include <widgets/wx_menubar.h>
37#include <file_history.h>
38#include <tool/tool_manager.h>
40#include <tool/common_control.h>
41#include <bitmap2cmp_control.h>
42#include <tool/actions.h>
43
44#include <wx/filedlg.h>
45#include <wx/msgdlg.h>
46
47
48#define DEFAULT_DPI 300 // the image DPI used in formats that do not define a DPI
49
51{
52 m_outputSize = 0.0;
55 m_unit = EDA_UNITS::MILLIMETRES;
56}
57
58
60{
61 // Safety-check to guarantee no divide-by-zero
62 m_originalDPI = std::max( 1, m_originalDPI );
63
64 // Set the m_outputSize value from the m_originalSizePixels and the selected unit
65 if( m_unit == EDA_UNITS::MILLIMETRES )
67 else if( m_unit == EDA_UNITS::INCHES )
69 else
71}
72
73
75{
76 int outputDPI;
77
78 if( m_unit == EDA_UNITS::MILLIMETRES )
79 outputDPI = GetOriginalSizePixels() / ( m_outputSize / 25.4 );
80 else if( m_unit == EDA_UNITS::INCHES )
81 outputDPI = GetOriginalSizePixels() / m_outputSize;
82 else
83 outputDPI = KiROUND( m_outputSize );
84
85 // Zero is not a DPI, and may cause divide-by-zero errors...
86 outputDPI = std::max( 1, outputDPI );
87
88 return outputDPI;
89}
90
91
93{
94 // Set the unit used for m_outputSize, and convert the old m_outputSize value
95 // to the value in new unit
96 if( aUnit == m_unit )
97 return;
98
99 // Convert m_outputSize to mm:
100 double size_mm;
101
102 if( m_unit == EDA_UNITS::MILLIMETRES )
103 {
104 size_mm = m_outputSize;
105 }
106 else if( m_unit == EDA_UNITS::INCHES )
107 {
108 size_mm = m_outputSize * 25.4;
109 }
110 else
111 {
112 // m_outputSize is the DPI, not an image size
113 // the image size is m_originalSizePixels / m_outputSize (in inches)
114 if( m_outputSize )
115 size_mm = m_originalSizePixels / m_outputSize * 25.4;
116 else
117 size_mm = 0;
118 }
119
120 // Convert m_outputSize to new value:
121 if( aUnit == EDA_UNITS::MILLIMETRES )
122 {
123 m_outputSize = size_mm;
124 }
125 else if( aUnit == EDA_UNITS::INCHES )
126 {
127 m_outputSize = size_mm / 25.4;
128 }
129 else
130 {
131 if( size_mm )
132 m_outputSize = m_originalSizePixels / size_mm * 25.4;
133 else
134 m_outputSize = 0;
135 }
136
137 m_unit = aUnit;
138}
139
140
141BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
142 EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
143 EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
144
147END_EVENT_TABLE()
148
149
150BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
151 KIWAY_PLAYER( aKiway, aParent, FRAME_BM2CMP, _( "Image Converter" ), wxDefaultPosition,
152 wxDefaultSize, wxDEFAULT_FRAME_STYLE, wxT( "bitmap2cmp" ), unityScale ),
153 m_panel( nullptr ),
154 m_statusBar( nullptr )
155{
156 m_aboutTitle = _HKI( "KiCad Image Converter" );
157
158 // Give an icon
159 wxIcon icon;
160 wxIconBundle icon_bundle;
161
162 icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component ) );
163 icon_bundle.AddIcon( icon );
164 icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component_32 ) );
165 icon_bundle.AddIcon( icon );
166 icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component_16 ) );
167 icon_bundle.AddIcon( icon );
168
169 SetIcons( icon_bundle );
170
171 wxBoxSizer* mainSizer = new wxBoxSizer( wxVERTICAL );
172 SetSizer( mainSizer );
173
174 m_panel = new BITMAP2CMP_PANEL( this );
175 mainSizer->Add( m_panel, 1, wxEXPAND, 5 );
176
177 m_statusBar = this->CreateStatusBar( 1, wxSTB_SIZEGRIP, wxID_ANY );
178
179 LoadSettings( config() );
180
181 m_toolManager = new TOOL_MANAGER;
182 m_toolManager->SetEnvironment( nullptr, nullptr, nullptr, config(), this );
183
184 m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
185
186 // Register tools
187 m_toolManager->RegisterTool( new COMMON_CONTROL );
188 m_toolManager->RegisterTool( new BITMAP2CMP_CONTROL );
189 m_toolManager->InitTools();
190
191 ReCreateMenuBar();
192
193 GetSizer()->SetSizeHints( this );
194
195 SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
196
197 if ( m_framePos == wxDefaultPosition )
198 Centre();
199}
200
201
203{
204 SaveSettings( config() );
205 /*
206 * This needed for OSX: avoids further OnDraw processing after this
207 * destructor and before the native window is destroyed
208 */
209 Freeze();
210}
211
212
213void BITMAP2CMP_FRAME::OnExit( wxCommandEvent& aEvent )
214{
215 // Just generate a wxCloseEvent
216 Close( false );
217}
218
219
221{
222 return m_panel->GetCurrentPage();
223}
224
225
226void BITMAP2CMP_FRAME::OnFileHistory( wxCommandEvent& event )
227{
228 wxString fn = GetFileFromHistory( event.GetId(), _( "Image files" ) );
229
230 if( !fn.IsEmpty() )
231 {
232 OpenProjectFiles( std::vector<wxString>( 1, fn ) );
233 Refresh();
234 }
235}
236
237
238void BITMAP2CMP_FRAME::OnClearFileHistory( wxCommandEvent& aEvent )
239{
241}
242
243
245{
247 EDA_BASE_FRAME* base_frame = dynamic_cast<EDA_BASE_FRAME*>( this );
248
249 // base_frame == nullptr should not happen, but it makes Coverity happy
250 wxCHECK( base_frame, /* void */ );
251
252 // wxWidgets handles the OSX Application menu behind the scenes, but that means
253 // we always have to start from scratch with a new wxMenuBar.
254 wxMenuBar* oldMenuBar = base_frame->GetMenuBar();
255 WX_MENUBAR* menuBar = new WX_MENUBAR();
256
257 //-- File menu -----------------------------------------------------------
258 //
259 ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
260
261 fileMenu->Add( ACTIONS::open );
262
263 static ACTION_MENU* openRecentMenu;
264 FILE_HISTORY& fileHistory = GetFileHistory();
265
266 // Create the menu if it does not exist. Adding a file to/from the history
267 // will automatically refresh the menu.
268 if( !openRecentMenu )
269 {
270 openRecentMenu = new ACTION_MENU( false, tool );
271 openRecentMenu->SetIcon( BITMAPS::recent );
272
273 fileHistory.UseMenu( openRecentMenu );
274 fileHistory.AddFilesToMenu();
275 }
276
277 // Ensure the title is up to date after changing language
278 openRecentMenu->SetTitle( _( "Open Recent" ) );
279 fileHistory.UpdateClearText( openRecentMenu, _( "Clear Recent Files" ) );
280
281 wxMenuItem* item = fileMenu->Add( openRecentMenu->Clone() );
282
283 // Add the file menu condition here since it needs the item ID for the submenu
285 cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
286 RegisterUIUpdateHandler( item->GetId(), cond );
287
288 fileMenu->AppendSeparator();
289 fileMenu->AddQuit( _( "Image Converter" ) );
290
291 //-- Preferences menu -----------------------------------------------
292 //
293 ACTION_MENU* prefsMenu = new ACTION_MENU( false, tool );
294
295 prefsMenu->Add( ACTIONS::openPreferences );
296
297 prefsMenu->AppendSeparator();
298 AddMenuLanguageList( prefsMenu, tool );
299
300
301 //-- Menubar -------------------------------------------------------------
302 //
303 menuBar->Append( fileMenu, _( "&File" ) );
304 menuBar->Append( prefsMenu, _( "&Preferences" ) );
305 base_frame->AddStandardHelpMenu( menuBar );
306
307 base_frame->SetMenuBar( menuBar );
308 delete oldMenuBar;
309}
310
311
313{
315
316 UpdateTitle();
317
318 SaveSettings( config() );
319 IMAGE_SIZE imageSizeX = m_panel->GetOutputSizeX();
320 IMAGE_SIZE imageSizeY = m_panel->GetOutputSizeY();
321 Freeze();
322
323 wxSizer* mainSizer = m_panel->GetContainingSizer();
324 mainSizer->Detach( m_panel );
325 m_panel->Destroy();
326
327 m_panel = new BITMAP2CMP_PANEL( this );
328 mainSizer->Add( m_panel, 1, wxEXPAND, 5 );
329 Layout();
330
331 if( !m_bitmapFileName.IsEmpty() )
332 OpenProjectFiles( std::vector<wxString>( 1, m_bitmapFileName ) );
333
334 LoadSettings( config() );
335 m_panel->SetOutputSize( imageSizeX, imageSizeY );
336
337 Thaw();
338 Refresh();
339}
340
341
343{
344 wxString title;
345
346 if( !m_bitmapFileName.IsEmpty() )
347 {
348 wxFileName filename( m_bitmapFileName );
349 title = filename.GetFullName() + wxT( " \u2014 " );
350 }
351
352 title += _( "Image Converter" );
353
354 SetTitle( title );
355}
356
357
359{
361
362 BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg );
363
364 if( cfg )
365 {
368 m_panel->LoadSettings( cfg );
369 }
370}
371
372
374{
376
377 BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg );
378
379 if( cfg )
380 {
383 m_panel->SaveSettings( cfg );
384 }
385}
386
387
389{
390 wxFileName fn( m_bitmapFileName );
391 wxString path = fn.GetPath();
392
393 if( path.IsEmpty() || !wxDirExists( path ) )
394 path = m_mruPath;
395
396 wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString,
397 _( "Image Files" ) + wxS( " " )+ wxImage::GetImageExtWildcard(),
398 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
399
400 int diag = fileDlg.ShowModal();
401
402 if( diag != wxID_OK )
403 return;
404
405 wxString fullFilename = fileDlg.GetPath();
406
407 if( !OpenProjectFiles( std::vector<wxString>( 1, fullFilename ) ) )
408 return;
409
410 fn = fullFilename;
411 m_mruPath = fn.GetPath();
412 SetStatusText( fullFilename );
413 UpdateTitle();
414 Refresh();
415}
416
417
418bool BITMAP2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl )
419{
420 m_bitmapFileName = aFileSet[0];
421
422 if( m_panel->OpenProjectFiles( aFileSet, aCtl ) )
423 {
425 return true;
426 }
427
428 return false;
429}
430
431
433{
434 wxFileName fn( m_convertedFileName );
435 wxString path = fn.GetPath();
436
437 if( path.IsEmpty() || !wxDirExists(path) )
438 path = ::wxGetCwd();
439
440 wxFileDialog fileDlg( this, _( "Create Drawing Sheet File" ), path, wxEmptyString,
441 DrawingSheetFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
442 int diag = fileDlg.ShowModal();
443
444 if( diag != wxID_OK )
445 return;
446
447 fn = fileDlg.GetPath();
448 fn.SetExt( DrawingSheetFileExtension );
449 m_convertedFileName = fn.GetFullPath();
450
451 FILE* outfile;
452 outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
453
454 if( outfile == nullptr )
455 {
456 wxString msg;
457 msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
458 wxMessageBox( msg );
459 return;
460 }
461
462 std::string buffer;
464 fputs( buffer.c_str(), outfile );
465 fclose( outfile );
466}
467
468
470{
471 wxFileName fn( m_convertedFileName );
472 wxString path = fn.GetPath();
473
474 if( path.IsEmpty() || !wxDirExists( path ) )
475 path = ::wxGetCwd();
476
477 wxFileDialog fileDlg( this, _( "Create PostScript File" ), path, wxEmptyString,
478 PSFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
479
480 if( fileDlg.ShowModal() != wxID_OK )
481 return;
482
483 fn = fileDlg.GetPath();
484 fn.SetExt( wxT( "ps" ) );
485 m_convertedFileName = fn.GetFullPath();
486
487 FILE* outfile;
488 outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
489
490 if( outfile == nullptr )
491 {
492 wxString msg;
493 msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
494 wxMessageBox( msg );
495 return;
496 }
497
498 std::string buffer;
500 fputs( buffer.c_str(), outfile );
501 fclose( outfile );
502}
503
504
506{
507 wxFileName fn( m_convertedFileName );
508 wxString path = fn.GetPath();
509
510 if( path.IsEmpty() || !wxDirExists(path) )
511 path = ::wxGetCwd();
512
513 wxFileDialog fileDlg( this, _( "Create Symbol Library" ), path, wxEmptyString,
514 KiCadSymbolLibFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
515
516 if( fileDlg.ShowModal() != wxID_OK )
517 return;
518
519 fn = EnsureFileExtension( fileDlg.GetPath(), KiCadSymbolLibFileExtension );
520 m_convertedFileName = fn.GetFullPath();
521
522 FILE* outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
523
524 if( outfile == nullptr )
525 {
526 wxString msg;
527 msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
528 wxMessageBox( msg );
529 return;
530 }
531
532 std::string buffer;
534 fputs( buffer.c_str(), outfile );
535 fclose( outfile );
536}
537
538
540{
541 wxFileName fn( m_convertedFileName );
542 wxString path = fn.GetPath();
543
544 if( path.IsEmpty() || !wxDirExists( path ) )
545 path = m_mruPath;
546
547 wxFileDialog fileDlg( this, _( "Create Footprint Library" ), path, wxEmptyString,
548 KiCadFootprintLibFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
549
550 if( fileDlg.ShowModal() != wxID_OK )
551 return;
552
553 fn = EnsureFileExtension( fileDlg.GetPath(), KiCadFootprintFileExtension );
554 m_convertedFileName = fn.GetFullPath();
555
556 FILE* outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
557
558 if( outfile == nullptr )
559 {
560 wxString msg;
561 msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
562 wxMessageBox( msg );
563 return;
564 }
565
566 std::string buffer;
568 fputs( buffer.c_str(), outfile );
569 fclose( outfile );
570 m_mruPath = fn.GetPath();
571}
572
573
constexpr EDA_IU_SCALE unityScale
Definition: base_units.h:112
#define DEFAULT_DPI
@ KICAD_WKS_LOGO
@ PCBNEW_KICAD_MOD
@ POSTSCRIPT_FMT
@ EESCHEMA_FMT
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:104
@ icon_bitmap2component
@ icon_bitmap2component_32
@ icon_bitmap2component_16
static TOOL_ACTION openPreferences
Definition: actions.h:187
static TOOL_ACTION open
Definition: actions.h:50
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:49
void AddQuit(const wxString &aAppname="")
Add a standard Quit item to the menu.
ACTION_MENU * Clone() const
Create a deep, recursive copy of this ACTION_MENU.
void SetTitle(const wxString &aTitle) override
Set title for the menu.
Definition: action_menu.cpp:91
void SetIcon(BITMAPS aIcon)
Assign an icon for the entry.
Definition: action_menu.cpp:77
wxMenuItem * Add(const wxString &aLabel, int aId, BITMAPS aIcon)
Add a wxWidgets-style entry to the menu.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
Handle actions for the various symbol editor and viewers.
void ExportPcbnewFormat()
Generate a footprint in S expr format.
void ExportDrawingSheetFormat()
Generate a file suitable to be copied into a drawing sheet (.kicad_wks) file.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void ExportEeschemaFormat()
Generate a schematic library which contains one component: the logo.
void OnExit(wxCommandEvent &aEvent)
Event handler for the wxID_EXIT and wxID_CLOSE events.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void OnFileHistory(wxCommandEvent &event)
wxString m_convertedFileName
void doReCreateMenuBar() override
wxString m_bitmapFileName
wxWindow * GetToolCanvas() const override
Canvas access.
void ExportPostScriptFormat()
Generate a postscript file.
BITMAP2CMP_PANEL * m_panel
bool OpenProjectFiles(const std::vector< wxString > &aFilenames, int aCtl=0) override
Open a project or set of files given by aFileList.
void OnClearFileHistory(wxCommandEvent &event)
void ShowChangedLanguage() override
void SetOutputSize(const IMAGE_SIZE &aSizeX, const IMAGE_SIZE &aSizeY)
void LoadSettings(BITMAP2CMP_SETTINGS *aCfg)
IMAGE_SIZE GetOutputSizeX() const
bool OpenProjectFiles(const std::vector< wxString > &aFilenames, int aCtl=0)
wxWindow * GetCurrentPage()
void SaveSettings(BITMAP2CMP_SETTINGS *aCfg)
IMAGE_SIZE GetOutputSizeY() const
void ExportToBuffer(std::string &aOutput, OUTPUT_FMT_ID aFormat)
generate a export data of the current bitmap.
Handle actions that are shared between different applications.
The base frame for deriving all KiCad main window classes.
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to Master...
void UpdateFileHistory(const wxString &FullFileName, FILE_HISTORY *aFileHistory=nullptr)
Update the list of recently opened files.
void ClearFileHistory(FILE_HISTORY *aFileHistory=nullptr)
Removes all files from the file history.
virtual void LoadSettings(APP_SETTINGS_BASE *aCfg)
Load common frame parameters from a configuration file.
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
wxString GetFileFromHistory(int cmdId, const wxString &type, FILE_HISTORY *aFileHistory=nullptr)
Fetches the file name from the file history list.
virtual void SaveSettings(APP_SETTINGS_BASE *aCfg)
Save common frame parameters to a configuration data file.
virtual void RegisterUIUpdateHandler(int aID, const ACTION_CONDITIONS &aConditions) override
Register a UI update handler for the control with ID aID.
wxString m_mruPath
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: file_history.h:43
static SELECTION_CONDITION FileHistoryNotEmpty(const FILE_HISTORY &aHistory)
Create a SELECTION_CONDITION that can be used to enable a menu item when the file history has items i...
void UpdateClearText(wxMenu *aMenu, wxString aClearText)
Update the text displayed on the menu item that clears the entire menu.
void AddFilesToMenu() override
Add the files to all registered menus.
Definition: file_history.h:98
void SetUnit(EDA_UNITS aUnit)
double m_outputSize
EDA_UNITS m_unit
int GetOriginalSizePixels()
int m_originalSizePixels
void SetOutputSizeFromInitialImageSize()
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:67
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:279
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:165
Master controller class:
Definition: tool_manager.h:57
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).
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition: wx_menubar.h:46
wxString EnsureFileExtension(const wxString &aFilename, const wxString &aExtension)
It's annoying to throw up nag dialogs when the extension isn't right.
Definition: common.cpp:398
The common library.
#define _HKI(x)
#define _(s)
EDA_UNITS
Definition: eda_units.h:46
EVT_MENU_RANGE(ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILEMAX, GERBVIEW_FRAME::OnDrlFileHistory) EVT_MENU_RANGE(ID_GERBVIEW_ZIP_FILE1
@ FRAME_BM2CMP
Definition: frame_type.h:61
const std::string KiCadSymbolLibFileExtension
const std::string KiCadFootprintFileExtension
const std::string DrawingSheetFileExtension
wxString KiCadFootprintLibFileWildcard()
wxString DrawingSheetFileWildcard()
wxString PSFileWildcard()
wxString KiCadSymbolLibFileWildcard()
@ ID_FILE_LIST_CLEAR
Definition: id.h:87
@ ID_FILEMAX
Definition: id.h:85
@ ID_FILE1
Definition: id.h:84
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
see class PGM_BASE
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
ACTION_CONDITIONS & Enable(const SELECTION_CONDITION &aCondition)
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:85
Definition of file extensions used in Kicad.