Actionize Gerber file commands.
Fixes https://gitlab.com/kicad/code/kicad/issues/2408
This commit is contained in:
parent
b8e0b9759a
commit
ed3e366715
|
@ -33,7 +33,6 @@
|
||||||
#include <dialog_helpers.h>
|
#include <dialog_helpers.h>
|
||||||
#include <DCodeSelectionbox.h>
|
#include <DCodeSelectionbox.h>
|
||||||
#include <gerbview_layer_widget.h>
|
#include <gerbview_layer_widget.h>
|
||||||
#include <gerbview_draw_panel_gal.h>
|
|
||||||
#include <gal/graphics_abstraction_layer.h>
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <tool/selection.h>
|
#include <tool/selection.h>
|
||||||
|
@ -48,16 +47,11 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_CLOSE( GERBVIEW_FRAME::OnCloseWindow )
|
EVT_CLOSE( GERBVIEW_FRAME::OnCloseWindow )
|
||||||
EVT_SIZE( GERBVIEW_FRAME::OnSize )
|
EVT_SIZE( GERBVIEW_FRAME::OnSize )
|
||||||
|
|
||||||
EVT_TOOL( wxID_FILE, GERBVIEW_FRAME::Files_io )
|
|
||||||
EVT_TOOL( ID_GERBVIEW_ERASE_ALL, GERBVIEW_FRAME::Files_io )
|
EVT_TOOL( ID_GERBVIEW_ERASE_ALL, GERBVIEW_FRAME::Files_io )
|
||||||
EVT_TOOL( ID_GERBVIEW_RELOAD_ALL, GERBVIEW_FRAME::Files_io )
|
EVT_TOOL( ID_GERBVIEW_RELOAD_ALL, GERBVIEW_FRAME::Files_io )
|
||||||
EVT_TOOL( ID_GERBVIEW_LOAD_DRILL_FILE, GERBVIEW_FRAME::Files_io )
|
|
||||||
EVT_TOOL( ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE, GERBVIEW_FRAME::Files_io )
|
|
||||||
EVT_TOOL( ID_GERBVIEW_LOAD_JOB_FILE, GERBVIEW_FRAME::Files_io )
|
|
||||||
EVT_TOOL( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
|
EVT_TOOL( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
|
||||||
|
|
||||||
// Menu Files:
|
// Menu Files:
|
||||||
EVT_MENU( wxID_FILE, GERBVIEW_FRAME::Files_io )
|
|
||||||
EVT_MENU( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
|
EVT_MENU( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
|
||||||
EVT_MENU( ID_GERBVIEW_EXPORT_TO_PCBNEW, GERBVIEW_FRAME::ExportDataInPcbnewFormat )
|
EVT_MENU( ID_GERBVIEW_EXPORT_TO_PCBNEW, GERBVIEW_FRAME::ExportDataInPcbnewFormat )
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <wx/fs_zip.h>
|
|
||||||
#include <wx/wfstream.h>
|
#include <wx/wfstream.h>
|
||||||
#include <wx/zipstrm.h>
|
#include <wx/zipstrm.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
@ -39,9 +38,8 @@
|
||||||
#include <widgets/progress_reporter.h>
|
#include <widgets/progress_reporter.h>
|
||||||
|
|
||||||
// HTML Messages used more than one time:
|
// HTML Messages used more than one time:
|
||||||
#define MSG_NO_MORE_LAYER\
|
#define MSG_NO_MORE_LAYER _( "<b>No more available layers in Gerbview to load files" )
|
||||||
_( "<b>No more available free graphic layer</b> in Gerbview to load files" )
|
#define MSG_NOT_LOADED _( "\n<b>Not loaded:</b> <i>%s</i>" )
|
||||||
#define MSG_NOT_LOADED _( "\n<b>Not loaded:</b> <i>%s</i>" )
|
|
||||||
|
|
||||||
|
|
||||||
void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
|
void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
|
||||||
|
@ -119,14 +117,8 @@ void GERBVIEW_FRAME::OnClearJobFileHistory( wxCommandEvent& aEvent )
|
||||||
/* File commands. */
|
/* File commands. */
|
||||||
void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
switch( event.GetId() )
|
||||||
|
|
||||||
switch( id )
|
|
||||||
{
|
{
|
||||||
case wxID_FILE:
|
|
||||||
LoadGerberFiles( wxEmptyString );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_GERBVIEW_ERASE_ALL:
|
case ID_GERBVIEW_ERASE_ALL:
|
||||||
Clear_DrawLayers( false );
|
Clear_DrawLayers( false );
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
|
@ -170,21 +162,6 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_DRILL_FILE:
|
|
||||||
LoadExcellonFiles( wxEmptyString );
|
|
||||||
GetCanvas()->Refresh();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE:
|
|
||||||
LoadZipArchiveFile( wxEmptyString );
|
|
||||||
GetCanvas()->Refresh();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_JOB_FILE:
|
|
||||||
LoadGerberJobFile( wxEmptyString );
|
|
||||||
GetCanvas()->Refresh();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "File_io: unexpected command id" );
|
wxFAIL_MSG( "File_io: unexpected command id" );
|
||||||
break;
|
break;
|
||||||
|
@ -204,13 +181,13 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
|
||||||
{
|
{
|
||||||
/* Standard gerber filetypes
|
/* Standard gerber filetypes
|
||||||
* (See http://en.wikipedia.org/wiki/Gerber_File)
|
* (See http://en.wikipedia.org/wiki/Gerber_File)
|
||||||
* the .gbr (.pho in legacy files) extension is the default used in Pcbnew
|
* The .gbr (.pho in legacy files) extension is the default used in Pcbnew; however
|
||||||
* However there are a lot of other extensions used for gerber files
|
* there are a lot of other extensions used for gerber files. Because the first letter
|
||||||
* Because the first letter is usually g, we accept g* as extension
|
* is usually g, we accept g* as extension.
|
||||||
* (Mainly internal copper layers do not have specific extension,
|
* (Mainly internal copper layers do not have specific extension, and filenames are like
|
||||||
* and filenames are like *.g1, *.g2 *.gb1 ...).
|
* *.g1, *.g2 *.gb1 ...)
|
||||||
* Now (2014) Ucamco (the company which manages the Gerber format) encourages
|
* Now (2014) Ucamco (the company which manages the Gerber format) encourages use of .gbr
|
||||||
* use of .gbr only and the Gerber X2 file format.
|
* only and the Gerber X2 file format.
|
||||||
*/
|
*/
|
||||||
filetypes = _( "Gerber files (.g* .lgr .pho)" );
|
filetypes = _( "Gerber files (.g* .lgr .pho)" );
|
||||||
filetypes << wxT("|");
|
filetypes << wxT("|");
|
||||||
|
@ -247,9 +224,7 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
|
||||||
currentPath.RemoveLast();
|
currentPath.RemoveLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Open Gerber File(s)" ),
|
wxFileDialog dlg( this, _( "Open Gerber File(s)" ), currentPath, filename.GetFullName(),
|
||||||
currentPath,
|
|
||||||
filename.GetFullName(),
|
|
||||||
filetypes,
|
filetypes,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR );
|
||||||
dlg.SetFilterIndex( lastGerberFileWildcard );
|
dlg.SetFilterIndex( lastGerberFileWildcard );
|
||||||
|
@ -669,12 +644,8 @@ bool GERBVIEW_FRAME::LoadZipArchiveFile( const wxString& aFullFileName )
|
||||||
else
|
else
|
||||||
currentPath = m_mruPath;
|
currentPath = m_mruPath;
|
||||||
|
|
||||||
wxFileDialog dlg( this,
|
wxFileDialog dlg( this, _( "Open Zip File" ), currentPath, filename.GetFullName(),
|
||||||
_( "Open Zip File" ),
|
ZipFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
||||||
currentPath,
|
|
||||||
filename.GetFullName(),
|
|
||||||
ZipFileWildcard(),
|
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command IDs for the printed circuit board editor.
|
|
||||||
*
|
|
||||||
* Please add IDs that are unique to the gerber file viewer (GerbView) here and not in
|
* Please add IDs that are unique to the gerber file viewer (GerbView) here and not in
|
||||||
* the global id.h file. This will prevent the entire project from being rebuilt when
|
* the global id.h file. This will prevent the entire project from being rebuilt when
|
||||||
* adding new commands to the GerbView.
|
* adding new commands to the GerbView.
|
||||||
|
@ -41,9 +39,6 @@ enum gerbview_ids
|
||||||
ID_MAIN_MENUBAR = ID_END_LIST,
|
ID_MAIN_MENUBAR = ID_END_LIST,
|
||||||
|
|
||||||
ID_GERBVIEW_SHOW_LIST_DCODES,
|
ID_GERBVIEW_SHOW_LIST_DCODES,
|
||||||
ID_GERBVIEW_LOAD_DRILL_FILE,
|
|
||||||
ID_GERBVIEW_LOAD_JOB_FILE,
|
|
||||||
ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE,
|
|
||||||
ID_GERBVIEW_ERASE_ALL,
|
ID_GERBVIEW_ERASE_ALL,
|
||||||
ID_GERBVIEW_RELOAD_ALL,
|
ID_GERBVIEW_RELOAD_ALL,
|
||||||
ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
|
ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <menus_helpers.h>
|
#include <menus_helpers.h>
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <advanced_config.h>
|
|
||||||
#include <tool/actions.h>
|
#include <tool/actions.h>
|
||||||
#include <tool/conditional_menu.h>
|
#include <tool/conditional_menu.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
|
@ -108,25 +107,17 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
||||||
m_zipFileHistory.AddFilesToMenu();
|
m_zipFileHistory.AddFilesToMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
fileMenu->AddItem( wxID_FILE, _( "Open &Gerber File(s)..." ),
|
fileMenu->AddItem( GERBVIEW_ACTIONS::openGerber, SELECTION_CONDITIONS::ShowAlways );
|
||||||
_( "Open Gerber file(s) on the current layer. Previous data will be deleted" ),
|
fileMenu->AddMenu( openRecentGbrMenu, FILE_HISTORY::FileHistoryNotEmpty( recentGbrFiles ) );
|
||||||
load_gerber_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
||||||
fileMenu->AddMenu( openRecentGbrMenu, FILE_HISTORY::FileHistoryNotEmpty( recentGbrFiles ) );
|
|
||||||
|
|
||||||
fileMenu->AddItem( ID_GERBVIEW_LOAD_DRILL_FILE, _( "Open &Excellon Drill File(s)..." ),
|
fileMenu->AddItem( GERBVIEW_ACTIONS::openDrillFile, SELECTION_CONDITIONS::ShowAlways );
|
||||||
_( "Open Excellon drill file(s) on the current layer. Previous data will be deleted" ),
|
fileMenu->AddMenu( openRecentDrlMenu, FILE_HISTORY::FileHistoryNotEmpty( m_drillFileHistory ) );
|
||||||
gerbview_drill_file_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
||||||
fileMenu->AddMenu( openRecentDrlMenu, FILE_HISTORY::FileHistoryNotEmpty( m_drillFileHistory ) );
|
|
||||||
|
|
||||||
fileMenu->AddItem( ID_GERBVIEW_LOAD_JOB_FILE, _( "Open Gerber &Job File..." ),
|
fileMenu->AddItem( GERBVIEW_ACTIONS::openJobFile, SELECTION_CONDITIONS::ShowAlways );
|
||||||
_( "Open a Gerber job file and its associated gerber files" ),
|
fileMenu->AddMenu( openRecentJobMenu, FILE_HISTORY::FileHistoryNotEmpty( m_jobFileHistory ) );
|
||||||
gerber_job_file_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
||||||
fileMenu->AddMenu( openRecentJobMenu, FILE_HISTORY::FileHistoryNotEmpty( m_jobFileHistory ) );
|
|
||||||
|
|
||||||
fileMenu->AddItem( ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE, _( "Open &Zip Archive File..." ),
|
fileMenu->AddItem( GERBVIEW_ACTIONS::openZipFile, SELECTION_CONDITIONS::ShowAlways );
|
||||||
_( "Open a zipped archive (Gerber and Drill) file" ),
|
fileMenu->AddMenu( openRecentZipMenu, FILE_HISTORY::FileHistoryNotEmpty( m_zipFileHistory ) );
|
||||||
zip_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
||||||
fileMenu->AddMenu( openRecentZipMenu, FILE_HISTORY::FileHistoryNotEmpty( m_zipFileHistory ) );
|
|
||||||
|
|
||||||
fileMenu->AddSeparator();
|
fileMenu->AddSeparator();
|
||||||
fileMenu->AddItem( ID_GERBVIEW_ERASE_ALL, _( "Clear &All Layers" ),
|
fileMenu->AddItem( ID_GERBVIEW_ERASE_ALL, _( "Clear &All Layers" ),
|
||||||
|
|
|
@ -31,14 +31,13 @@
|
||||||
#include <gbr_layer_box_selector.h>
|
#include <gbr_layer_box_selector.h>
|
||||||
#include <DCodeSelectionbox.h>
|
#include <DCodeSelectionbox.h>
|
||||||
#include <dialog_helpers.h>
|
#include <dialog_helpers.h>
|
||||||
#include <bitmaps.h>
|
|
||||||
#include <kicad_string.h>
|
#include <kicad_string.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
#include <tool/actions.h>
|
#include <tool/actions.h>
|
||||||
#include <tool/action_toolbar.h>
|
#include <tool/action_toolbar.h>
|
||||||
#include <tools/gerbview_actions.h>
|
#include <tools/gerbview_actions.h>
|
||||||
|
|
||||||
void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
void GERBVIEW_FRAME::ReCreateHToolbar()
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
|
@ -57,12 +56,8 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
||||||
KiScaledBitmap( reload2_xpm, this ),
|
KiScaledBitmap( reload2_xpm, this ),
|
||||||
_( "Reload all layers" ) );
|
_( "Reload all layers" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( wxID_FILE, wxEmptyString, KiScaledBitmap( load_gerber_xpm, this ),
|
m_mainToolBar->Add( GERBVIEW_ACTIONS::openGerber );
|
||||||
_( "Open Gerber file(s) on the current layer. Previous data will be deleted" ) );
|
m_mainToolBar->Add( GERBVIEW_ACTIONS::openDrillFile );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString,
|
|
||||||
KiScaledBitmap( gerbview_drill_file_xpm, this ),
|
|
||||||
_( "Open Excellon drill file(s) on the current layer. Previous data will be deleted" ) );
|
|
||||||
|
|
||||||
KiScaledSeparator( m_mainToolBar, this );
|
KiScaledSeparator( m_mainToolBar, this );
|
||||||
m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiScaledBitmap( print_button_xpm, this ),
|
m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiScaledBitmap( print_button_xpm, this ),
|
||||||
|
|
|
@ -55,6 +55,30 @@ OPT<TOOL_EVENT> GERBVIEW_ACTIONS::TranslateLegacyId( int aId )
|
||||||
|
|
||||||
// GERBVIEW_CONTROL
|
// GERBVIEW_CONTROL
|
||||||
//
|
//
|
||||||
|
TOOL_ACTION GERBVIEW_ACTIONS::openGerber( "gerbview.Control.openGerber",
|
||||||
|
AS_GLOBAL, 0, "",
|
||||||
|
_( "Open Gerber File(s)..." ),
|
||||||
|
_( "Open Gerber file(s) on the current layer. Previous data will be deleted" ),
|
||||||
|
load_gerber_xpm );
|
||||||
|
|
||||||
|
TOOL_ACTION GERBVIEW_ACTIONS::openDrillFile( "gerbview.Control.openDrillFile",
|
||||||
|
AS_GLOBAL, 0, "",
|
||||||
|
_( "Open Excellon Drill File(s)..." ),
|
||||||
|
_( "Open Excellon drill file(s) on the current layer. Previous data will be deleted" ),
|
||||||
|
gerbview_drill_file_xpm );
|
||||||
|
|
||||||
|
TOOL_ACTION GERBVIEW_ACTIONS::openJobFile( "gerbview.Control.openJobFile",
|
||||||
|
AS_GLOBAL, 0, "",
|
||||||
|
_( "Open Gerber Job File..." ),
|
||||||
|
_( "Open a Gerber job file and its associated gerber files" ),
|
||||||
|
gerber_job_file_xpm );
|
||||||
|
|
||||||
|
TOOL_ACTION GERBVIEW_ACTIONS::openZipFile( "gerbview.Control.openZipFile",
|
||||||
|
AS_GLOBAL, 0, "",
|
||||||
|
_( "Open Zip Archive File..." ),
|
||||||
|
_( "Open a zipped archive (Gerber and Drill) file" ),
|
||||||
|
zip_xpm );
|
||||||
|
|
||||||
TOOL_ACTION GERBVIEW_ACTIONS::layerChanged( "gerbview.Control.layerChanged",
|
TOOL_ACTION GERBVIEW_ACTIONS::layerChanged( "gerbview.Control.layerChanged",
|
||||||
AS_GLOBAL, 0, "", "", "",
|
AS_GLOBAL, 0, "", "", "",
|
||||||
nullptr, AF_NOTIFY );
|
nullptr, AF_NOTIFY );
|
||||||
|
|
|
@ -70,6 +70,12 @@ public:
|
||||||
|
|
||||||
static TOOL_ACTION layerChanged; // notification
|
static TOOL_ACTION layerChanged; // notification
|
||||||
|
|
||||||
|
// Files
|
||||||
|
static TOOL_ACTION openGerber;
|
||||||
|
static TOOL_ACTION openDrillFile;
|
||||||
|
static TOOL_ACTION openJobFile;
|
||||||
|
static TOOL_ACTION openZipFile;
|
||||||
|
|
||||||
// Highlighting
|
// Highlighting
|
||||||
static TOOL_ACTION highlightClear;
|
static TOOL_ACTION highlightClear;
|
||||||
static TOOL_ACTION highlightNet;
|
static TOOL_ACTION highlightNet;
|
||||||
|
|
|
@ -41,6 +41,42 @@ void GERBVIEW_CONTROL::Reset( RESET_REASON aReason )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int GERBVIEW_CONTROL::OpenGerber( const TOOL_EVENT& aEvent )
|
||||||
|
{
|
||||||
|
m_frame->LoadGerberFiles( wxEmptyString );
|
||||||
|
// loadListOfGerberAndDrillFiles() refreshes the canvas
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int GERBVIEW_CONTROL::OpenDrillFile( const TOOL_EVENT& aEvent )
|
||||||
|
{
|
||||||
|
m_frame->LoadExcellonFiles( wxEmptyString );
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int GERBVIEW_CONTROL::OpenJobFile( const TOOL_EVENT& aEvent )
|
||||||
|
{
|
||||||
|
m_frame->LoadGerberJobFile( wxEmptyString );
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int GERBVIEW_CONTROL::OpenZipFile( const TOOL_EVENT& aEvent )
|
||||||
|
{
|
||||||
|
m_frame->LoadZipArchiveFile( wxEmptyString );
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int GERBVIEW_CONTROL::HighlightControl( const TOOL_EVENT& aEvent )
|
int GERBVIEW_CONTROL::HighlightControl( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
auto settings = static_cast<KIGFX::GERBVIEW_PAINTER*>( getView()->GetPainter() )->GetSettings();
|
auto settings = static_cast<KIGFX::GERBVIEW_PAINTER*>( getView()->GetPainter() )->GetSettings();
|
||||||
|
@ -187,6 +223,10 @@ int GERBVIEW_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
void GERBVIEW_CONTROL::setTransitions()
|
void GERBVIEW_CONTROL::setTransitions()
|
||||||
{
|
{
|
||||||
|
Go( &GERBVIEW_CONTROL::OpenGerber, GERBVIEW_ACTIONS::openGerber.MakeEvent() );
|
||||||
|
Go( &GERBVIEW_CONTROL::OpenDrillFile, GERBVIEW_ACTIONS::openDrillFile.MakeEvent() );
|
||||||
|
Go( &GERBVIEW_CONTROL::OpenJobFile, GERBVIEW_ACTIONS::openJobFile.MakeEvent() );
|
||||||
|
Go( &GERBVIEW_CONTROL::OpenZipFile, GERBVIEW_ACTIONS::openZipFile.MakeEvent() );
|
||||||
Go( &GERBVIEW_CONTROL::Print, ACTIONS::print.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::Print, ACTIONS::print.MakeEvent() );
|
||||||
|
|
||||||
Go( &GERBVIEW_CONTROL::HighlightControl, GERBVIEW_ACTIONS::highlightClear.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::HighlightControl, GERBVIEW_ACTIONS::highlightClear.MakeEvent() );
|
||||||
|
|
|
@ -53,6 +53,12 @@ public:
|
||||||
int LayerAlphaInc( const TOOL_EVENT& aEvent );
|
int LayerAlphaInc( const TOOL_EVENT& aEvent );
|
||||||
int LayerAlphaDec( const TOOL_EVENT& aEvent );
|
int LayerAlphaDec( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
|
// Files
|
||||||
|
int OpenGerber( const TOOL_EVENT& aEvent );
|
||||||
|
int OpenDrillFile( const TOOL_EVENT& aEvent );
|
||||||
|
int OpenJobFile( const TOOL_EVENT& aEvent );
|
||||||
|
int OpenZipFile( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
// Highlight control
|
// Highlight control
|
||||||
int HighlightControl( const TOOL_EVENT& aEvent );
|
int HighlightControl( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue