New menu structure for ModEdit.
Includes some dialog changes to go with the menu update. Includes promoting the Pcbnew graphics mode back to main menu. Includes renaming Graphics modes to Toolsets.
This commit is contained in:
parent
01ab8b0584
commit
4d5e1489fb
|
@ -72,7 +72,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
|
|||
m_mainSizer->Add( sLeftSizer, 1, wxALL | wxEXPAND, 0 );
|
||||
|
||||
// @todo LEGACY: not required when legacy is gone
|
||||
const wxString galOnlySuffix = _( " (not supported in Legacy graphics)" );
|
||||
const wxString galOnlySuffix = _( " (not supported in Legacy Toolset)" );
|
||||
|
||||
/*
|
||||
* Anti-aliasing subpanel
|
||||
|
|
|
@ -196,7 +196,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar()
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiBitmap( cursor_shape_xpm ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ void LIB_EDIT_FRAME::ReCreateOptToolbar()
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar()
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
"and faster experience. This option is turned off by "
|
||||
"default since it is not compatible with all computers.\n\n"
|
||||
"Would you like to try enabling graphics acceleration?\n\n"
|
||||
"If you'd like to choose later, select the Modern "
|
||||
"(Accelerated) graphics mode in the View menu." );
|
||||
"If you'd like to choose later, select Modern Toolset "
|
||||
"(Accelerated) in the Preferences menu." );
|
||||
|
||||
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
||||
wxYES_NO );
|
||||
|
|
|
@ -86,19 +86,19 @@ static EDA_HOTKEY HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
|
|||
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
|
||||
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
||||
|
||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
|
||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset" ),
|
||||
HK_CANVAS_LEGACY,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
#endif
|
||||
WXK_F9 );
|
||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
|
||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
HK_CANVAS_OPENGL,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
#endif
|
||||
WXK_F11 );
|
||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
|
||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
|
||||
HK_CANVAS_CAIRO,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
|
|
|
@ -211,29 +211,23 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
|||
// Canvas selection
|
||||
configMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "Legacy Graphic&s" ), GerbviewHokeysDescr,
|
||||
text = AddHotkeyName( _( "Legacy Tool&set" ), GerbviewHokeysDescr,
|
||||
HK_CANVAS_LEGACY );
|
||||
AddMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
|
||||
text, _( "Use Legacy Toolset (not all features will be available)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
configMenu->Append(
|
||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
|
||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
||||
wxITEM_RADIO ) );
|
||||
|
||||
text = AddHotkeyName( _( "Modern (&Accelerated)" ), GerbviewHokeysDescr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), GerbviewHokeysDescr,
|
||||
HK_CANVAS_OPENGL );
|
||||
AddMenuItem( configMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
configMenu->Append(
|
||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_OPENGL,
|
||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
||||
wxITEM_RADIO ) );
|
||||
|
||||
text = AddHotkeyName( _( "Modern (Fallba&ck)" ), GerbviewHokeysDescr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), GerbviewHokeysDescr,
|
||||
HK_CANVAS_CAIRO );
|
||||
|
||||
configMenu->Append(
|
||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_CAIRO,
|
||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( configMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
// Menu miscellaneous
|
||||
wxMenu* miscellaneousMenu = new wxMenu;
|
||||
|
|
|
@ -242,7 +242,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::Invoke( FOOTPRINT_EDIT_FRAME& aCaller )
|
|||
|
||||
DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME& aParent ) :
|
||||
DIALOG_SHIM( &aParent, wxID_ANY, _( "Display Options" ) ),
|
||||
m_parent( aParent ),
|
||||
m_last_scale( -1 )
|
||||
m_parent( aParent )
|
||||
{
|
||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
SetSizer( mainSizer );
|
||||
|
@ -54,28 +53,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
|
|||
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
|
||||
mainSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
|
||||
|
||||
auto fgsizer = new wxFlexGridSizer( 3 );
|
||||
fgsizer->AddGrowableCol( 1 );
|
||||
fgsizer->SetFlexibleDirection( wxBOTH );
|
||||
fgsizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
fgsizer->Add(
|
||||
new wxStaticText( this, wxID_ANY, _( "Icon scale:" ) ),
|
||||
0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
|
||||
m_scaleSlider = new STEPPED_SLIDER( this, wxID_ANY, 50, 50, 275,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxSL_AUTOTICKS | wxSL_HORIZONTAL | wxSL_LABELS );
|
||||
m_scaleSlider->SetStep( 25 );
|
||||
fgsizer->Add( m_scaleSlider, 1, wxLEFT | wxRIGHT | wxEXPAND, 3 );
|
||||
fgsizer->Add(
|
||||
new wxStaticText( this, wxID_ANY, "%" ),
|
||||
0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
|
||||
fgsizer->AddSpacer( 0 );
|
||||
m_scaleAuto = new wxCheckBox( this, wxID_ANY, _( "Auto" ) );
|
||||
fgsizer->Add( m_scaleAuto, wxLEFT | wxRIGHT | wxEXPAND, 3 );
|
||||
fgsizer->AddSpacer( 0 );
|
||||
|
||||
mainSizer->Add( fgsizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
|
||||
|
||||
auto btnSizer = new wxStdDialogButtonSizer();
|
||||
mainSizer->Add( btnSizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
|
||||
|
||||
|
@ -84,21 +61,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
|
|||
|
||||
btnSizer->Realize();
|
||||
|
||||
std::vector<wxEventTypeTag<wxScrollEvent>> scroll_events = {
|
||||
wxEVT_SCROLL_TOP, wxEVT_SCROLL_BOTTOM, wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN,
|
||||
wxEVT_SCROLL_PAGEUP, wxEVT_SCROLL_PAGEDOWN, wxEVT_SCROLL_THUMBTRACK,
|
||||
wxEVT_SCROLL_THUMBRELEASE };
|
||||
|
||||
for( auto evt : scroll_events )
|
||||
m_scaleSlider->Connect(
|
||||
evt, wxScrollEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider ),
|
||||
NULL, this );
|
||||
|
||||
m_scaleAuto->Connect(
|
||||
wxEVT_COMMAND_CHECKBOX_CLICKED,
|
||||
wxCommandEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto ),
|
||||
NULL, this );
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Centre();
|
||||
}
|
||||
|
@ -108,20 +70,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
{
|
||||
// update GAL options
|
||||
m_galOptsPanel->TransferDataToWindow();
|
||||
|
||||
const int scale_fourths = m_parent.GetIconScale();
|
||||
|
||||
if( scale_fourths <= 0 )
|
||||
{
|
||||
m_scaleAuto->SetValue( true );
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( &m_parent ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_scaleSlider->SetValue( scale_fourths * 25 );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -131,11 +79,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
// update GAL options
|
||||
m_galOptsPanel->TransferDataFromWindow();
|
||||
|
||||
const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
|
||||
|
||||
if( m_parent.GetIconScale() != scale_fourths )
|
||||
m_parent.SetIconScale( scale_fourths );
|
||||
|
||||
// refresh view
|
||||
KIGFX::VIEW* view = m_parent.GetGalCanvas()->GetView();
|
||||
view->RecacheAllItems();
|
||||
|
@ -144,25 +87,3 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider( wxScrollEvent& aEvent )
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_scaleAuto->GetValue() )
|
||||
{
|
||||
m_last_scale = m_scaleSlider->GetValue();
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_last_scale >= 0 )
|
||||
m_scaleSlider->SetValue( m_last_scale );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
class GAL_OPTIONS_PANEL;
|
||||
class FOOTPRINT_EDIT_FRAME;
|
||||
class STEPPED_SLIDER;
|
||||
class wxCheckBox;
|
||||
|
||||
class DIALOG_MODEDIT_DISPLAY_OPTIONS : public DIALOG_SHIM
|
||||
{
|
||||
|
@ -31,10 +29,6 @@ public:
|
|||
|
||||
static bool Invoke( FOOTPRINT_EDIT_FRAME& aCaller );
|
||||
|
||||
protected:
|
||||
void OnScaleSlider( wxScrollEvent& aEvent );
|
||||
void OnScaleAuto( wxCommandEvent& aEvent );
|
||||
|
||||
private:
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
|
@ -44,8 +38,4 @@ private:
|
|||
|
||||
// subpanel
|
||||
GAL_OPTIONS_PANEL* m_galOptsPanel;
|
||||
|
||||
int m_last_scale;
|
||||
wxCheckBox* m_scaleAuto;
|
||||
STEPPED_SLIDER* m_scaleSlider;
|
||||
};
|
||||
|
|
|
@ -230,6 +230,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
wxIcon icon;
|
||||
icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
|
||||
SetIcon( icon );
|
||||
m_iconScale = -1;
|
||||
|
||||
// Show a title (frame title + footprint name):
|
||||
updateTitle();
|
||||
|
@ -1028,20 +1029,19 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable )
|
|||
|
||||
int FOOTPRINT_EDIT_FRAME::GetIconScale()
|
||||
{
|
||||
int scale = 0;
|
||||
Kiface().KifaceSettings()->Read( IconScaleEntry, &scale, 0 );
|
||||
return scale;
|
||||
// All environmental settings will move to app for 6.0, so just inherit from pcbnew
|
||||
// for now.
|
||||
if( m_iconScale == -1 )
|
||||
{
|
||||
bool isBoardEditorRunning = Kiway().Player( FRAME_PCB, false ) != nullptr;
|
||||
PCB_BASE_FRAME* pcbFrame = static_cast<PCB_BASE_FRAME*>( Kiway().Player( FRAME_PCB, true ) );
|
||||
m_iconScale = pcbFrame->GetIconScale();
|
||||
|
||||
if( !isBoardEditorRunning )
|
||||
pcbFrame->Destroy();
|
||||
}
|
||||
|
||||
return m_iconScale;
|
||||
}
|
||||
|
||||
|
||||
void FOOTPRINT_EDIT_FRAME::SetIconScale( int aScale )
|
||||
{
|
||||
Kiface().KifaceSettings()->Write( IconScaleEntry, aScale );
|
||||
ReCreateMenuBar();
|
||||
ReCreateHToolbar();
|
||||
ReCreateAuxiliaryToolbar();
|
||||
ReCreateVToolbar();
|
||||
ReCreateOptToolbar();
|
||||
Layout();
|
||||
SendSizeEvent();
|
||||
}
|
||||
|
|
|
@ -483,7 +483,6 @@ public:
|
|||
bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
|
||||
|
||||
int GetIconScale() override;
|
||||
void SetIconScale( int aScale ) override;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
@ -497,6 +496,9 @@ protected:
|
|||
/// List of footprint editor configuration parameters.
|
||||
PARAM_CFG_ARRAY m_configParams;
|
||||
|
||||
/// Pretty much what it says on the tin.
|
||||
int m_iconScale;
|
||||
|
||||
/**
|
||||
* Function UpdateTitle
|
||||
* updates window title according to getLibNickName().
|
||||
|
|
|
@ -202,7 +202,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
|||
break;
|
||||
|
||||
case ID_MODEDIT_MEASUREMENT_TOOL:
|
||||
DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
|
||||
DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
|
||||
|
|
|
@ -977,7 +977,7 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent )
|
|||
break;
|
||||
|
||||
case ID_MODEDIT_MEASUREMENT_TOOL:
|
||||
DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
|
||||
DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
|
||||
|
|
|
@ -128,19 +128,19 @@ static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ),
|
|||
static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
|
||||
static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
|
||||
|
||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
|
||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset (not all features will be available" ),
|
||||
HK_CANVAS_LEGACY,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
#endif
|
||||
WXK_F9 );
|
||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
|
||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
HK_CANVAS_OPENGL,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
#endif
|
||||
WXK_F11 );
|
||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
|
||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
|
||||
HK_CANVAS_CAIRO,
|
||||
#ifdef __WXMAC__
|
||||
GR_KB_ALT +
|
||||
|
@ -319,7 +319,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
|
|||
EDA_HOTKEY* module_edit_Hotkey_List[] = {
|
||||
&HkMoveItem, &HkRotateItem, &HkEditBoardItem,
|
||||
&HkMoveItemExact, &HkDuplicateItem, &HkDuplicateItemAndIncrement,
|
||||
&HkCreateArray, &HkDelete,
|
||||
&HkCreateArray, &HkDelete, &HkSwitchHighContrastMode,
|
||||
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -62,90 +62,100 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
wxMenu* fileMenu = new wxMenu;
|
||||
|
||||
// Active library selection
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB, _("Set Acti&ve Library..."),
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB,
|
||||
_("Set Acti&ve Library..."),
|
||||
_( "Select active library" ),
|
||||
KiBitmap( open_library_xpm ) );
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// New module
|
||||
text = AddHotkeyName( _( "&New Footprint..." ), m_hotkeysDescrList, HK_NEW );
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
|
||||
_( "&New Footprint..." ), _( "Create new footprint" ),
|
||||
text, _( "Create new footprint" ),
|
||||
KiBitmap( new_footprint_xpm ) );
|
||||
|
||||
// Open submenu
|
||||
wxMenu* openSubmenu = new wxMenu;
|
||||
|
||||
// from File
|
||||
AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
|
||||
_( "&Import Footprint From File..." ),
|
||||
_( "Import footprint from an existing file" ),
|
||||
KiBitmap( import_module_xpm ) );
|
||||
|
||||
// from Library
|
||||
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
|
||||
_( "Load Footprint From Active Li&brary..." ),
|
||||
_( "Open footprint from active library" ),
|
||||
text = AddHotkeyName( _( "&Open Footprint..." ), m_hotkeysDescrList, HK_OPEN );
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_LOAD_MODULE, text,
|
||||
_( "Open a footprint from a library" ),
|
||||
KiBitmap( module_xpm ) );
|
||||
|
||||
// from current Board
|
||||
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
|
||||
_( "Load Footprint From &Current Board..." ),
|
||||
_( "Load footprint from current board" ),
|
||||
KiBitmap( load_module_board_xpm ) );
|
||||
|
||||
/* Append openSubmenu to fileMenu */
|
||||
AddMenuItem( fileMenu, openSubmenu, -1,
|
||||
_( "&Load Footprint" ),
|
||||
_( "Load footprint" ),
|
||||
KiBitmap( load_module_lib_xpm ) );
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// Save the currently loaded legacy library as an s-expression library.
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
|
||||
_( "Save A&ctive Library As..." ),
|
||||
_( "Save entire active library under a new name" ),
|
||||
KiBitmap( copy_library_xpm ) );
|
||||
|
||||
// Save module
|
||||
text = AddHotkeyName( _( "&Save Footprint in Active Library" ),
|
||||
m_hotkeysDescrList, HK_SAVE );
|
||||
|
||||
text = AddHotkeyName( _( "&Save" ), m_hotkeysDescrList, HK_SAVE );
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
|
||||
_( "Save footprint in active library" ),
|
||||
_( "Save footprint" ),
|
||||
KiBitmap( save_library_xpm ) );
|
||||
|
||||
// Save module in new lib
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
|
||||
_( "S&ave Footprint in New Library..." ),
|
||||
_( "Create new library and save current footprint in it" ),
|
||||
KiBitmap( new_library_xpm ) );
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// Export module
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
|
||||
_( "&Export Footprint..." ),
|
||||
_( "Save currently loaded footprint into file" ),
|
||||
|
||||
wxMenu* importSubMenu = new wxMenu();
|
||||
|
||||
// from current Board
|
||||
AddMenuItem( importSubMenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
|
||||
_( "Footprint from &Current Board..." ),
|
||||
_( "Import a footprint from the current board" ),
|
||||
KiBitmap( load_module_board_xpm ) );
|
||||
|
||||
AddMenuItem( importSubMenu, ID_MODEDIT_IMPORT_PART,
|
||||
_( "Footprint from &KiCad File..." ),
|
||||
_( "Import a footprint from an existing file" ),
|
||||
KiBitmap( import_module_xpm ) );
|
||||
|
||||
AddMenuItem( importSubMenu, ID_GEN_IMPORT_DXF_FILE,
|
||||
_( "Footprint from &DXF File..." ),
|
||||
_( "Import 2D Drawing DXF file to Footprint Editor on Drawings layer" ),
|
||||
KiBitmap( import_xpm ) );
|
||||
|
||||
AddMenuItem( fileMenu, importSubMenu, -1,
|
||||
_( "&Import" ),
|
||||
_( "Import files" ),
|
||||
KiBitmap( import_xpm ) );
|
||||
|
||||
|
||||
wxMenu* exportSubMenu = new wxMenu();
|
||||
|
||||
AddMenuItem( exportSubMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
|
||||
_( "&Active Library..." ),
|
||||
_( "Export active library" ),
|
||||
KiBitmap( library_archive_xpm ) );
|
||||
|
||||
AddMenuItem( exportSubMenu, ID_MODEDIT_EXPORT_PART,
|
||||
_( "&Footprint..." ),
|
||||
_( "Export current footprint to a file" ),
|
||||
KiBitmap( export_module_xpm ) );
|
||||
|
||||
// Import DXF File
|
||||
AddMenuItem( fileMenu, ID_GEN_IMPORT_DXF_FILE,
|
||||
_( "&Import DXF File..." ),
|
||||
_( "Import 2D Drawing DXF file to Pcbnew on Drawings layer" ),
|
||||
KiBitmap( import_xpm ) );
|
||||
AddMenuItem( fileMenu, exportSubMenu, -1,
|
||||
_( "E&xport" ),
|
||||
_( "Export files" ),
|
||||
KiBitmap( export_xpm ) );
|
||||
|
||||
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// Print
|
||||
AddMenuItem( fileMenu, wxID_PRINT,
|
||||
_( "&Print..." ),
|
||||
text = AddHotkeyName( _( "&Print..." ), m_hotkeysDescrList, HK_PRINT );
|
||||
AddMenuItem( fileMenu, wxID_PRINT, text,
|
||||
_( "Print current footprint" ),
|
||||
KiBitmap( plot_xpm ) );
|
||||
KiBitmap( print_button_xpm ) );
|
||||
|
||||
// Separator
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// Properties
|
||||
AddMenuItem( fileMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
|
||||
_( "P&roperties..." ),
|
||||
_( "Edit footprint properties" ),
|
||||
KiBitmap( module_options_xpm ) );
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
// Close editor
|
||||
AddMenuItem( fileMenu, wxID_EXIT,
|
||||
_( "Cl&ose" ),
|
||||
_( "&Exit" ),
|
||||
_( "Close footprint editor" ),
|
||||
KiBitmap( exit_xpm ) );
|
||||
|
||||
|
@ -164,56 +174,44 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
text, _( "Redo last action" ),
|
||||
KiBitmap( redo_xpm ) );
|
||||
|
||||
// Delete items
|
||||
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
|
||||
_( "&Delete" ), _( "Delete objects with eraser" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
|
||||
// Separator
|
||||
editMenu->AppendSeparator();
|
||||
|
||||
if( IsGalCanvasActive() )
|
||||
{
|
||||
text = AddHotkeyName( _( "&Cut" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_CUT );
|
||||
text = AddHotkeyName( _( "Cu&t" ), m_hotkeysDescrList, HK_EDIT_CUT );
|
||||
AddMenuItem( editMenu, ID_EDIT_CUT, text, _(
|
||||
"Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
|
||||
text = AddHotkeyName( _( "&Copy" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_COPY );
|
||||
text = AddHotkeyName( _( "&Copy" ), m_hotkeysDescrList, HK_EDIT_COPY );
|
||||
AddMenuItem( editMenu, ID_EDIT_COPY, text, _(
|
||||
"Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
|
||||
text = AddHotkeyName( _( "&Paste" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_PASTE );
|
||||
text = AddHotkeyName( _( "&Paste" ), m_hotkeysDescrList, HK_EDIT_PASTE );
|
||||
AddMenuItem( editMenu, ID_EDIT_PASTE, text, _(
|
||||
"Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
|
||||
editMenu->AppendSeparator();
|
||||
}
|
||||
|
||||
// Properties
|
||||
AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
|
||||
_( "Footprint &Properties..." ),
|
||||
_( "Edit footprint properties" ),
|
||||
KiBitmap( module_options_xpm ) );
|
||||
// Delete items
|
||||
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
|
||||
_( "&Delete" ), _( "Delete items" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
|
||||
// Dimensions submenu
|
||||
wxMenu* dimensions_Submenu = new wxMenu;
|
||||
|
||||
// User grid size
|
||||
AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP,
|
||||
_( "Set Custom &User Grid..." ), _( "Set custom user grid size" ),
|
||||
KiBitmap( grid_xpm ) );
|
||||
|
||||
// Sizes and Widths
|
||||
AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
||||
_( "Text &Size and Width..." ),
|
||||
_( "Adjust width for text and drawing" ),
|
||||
KiBitmap( text_xpm ) );
|
||||
|
||||
// Pad settings
|
||||
AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS,
|
||||
_( "Default &Pad Properties..." ), _( "Edit settings for new pads" ),
|
||||
KiBitmap( pad_dimensions_xpm ) );
|
||||
editMenu->AppendSeparator();
|
||||
|
||||
//--------- View menu ----------------
|
||||
wxMenu* viewMenu = new wxMenu;
|
||||
|
||||
AddMenuItem( viewMenu, ID_OPEN_MODULE_VIEWER,
|
||||
_( "&Library Browser" ),
|
||||
_( "Open the Library Browser" ),
|
||||
KiBitmap( modview_icon_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
|
||||
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
|
||||
text, _( "Show footprint in 3D viewer" ),
|
||||
KiBitmap( three_d_xpm ) );
|
||||
|
||||
viewMenu->AppendSeparator();
|
||||
|
||||
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
|
||||
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
|
||||
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
|
||||
|
@ -244,37 +242,92 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
viewMenu->AppendSeparator();
|
||||
|
||||
// 3D view
|
||||
text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
|
||||
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, text, _( "Show footprint in 3D viewer" ),
|
||||
KiBitmap( three_d_xpm ) );
|
||||
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_GRID,
|
||||
_( "Show &Grid" ), wxEmptyString,
|
||||
KiBitmap( grid_xpm ), wxITEM_CHECK );
|
||||
|
||||
AddMenuItem( viewMenu, ID_PCB_USER_GRID_SETUP,
|
||||
_( "Grid &Settings..." ),_( "Adjust custom user-defined grid dimensions" ),
|
||||
KiBitmap( grid_xpm ) );
|
||||
|
||||
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
||||
_( "Display &Polar Coordinates" ), wxEmptyString,
|
||||
KiBitmap( polar_coord_xpm ), wxITEM_CHECK );
|
||||
|
||||
// Units submenu
|
||||
wxMenu* unitsSubMenu = new wxMenu;
|
||||
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_INCH,
|
||||
_( "&Imperial" ), _( "Use imperial units" ),
|
||||
KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
|
||||
|
||||
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_MM,
|
||||
_( "&Metric" ), _( "Use metric units" ),
|
||||
KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
|
||||
|
||||
AddMenuItem( viewMenu, unitsSubMenu,
|
||||
-1, _( "&Units" ),
|
||||
_( "Select which units are displayed" ),
|
||||
KiBitmap( unit_mm_xpm ) );
|
||||
|
||||
#ifndef __APPLE__
|
||||
AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||
_( "Full Window Crosshair" ),
|
||||
_( "Change cursor shape" ),
|
||||
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||
#else
|
||||
AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||
_( "Full Window Crosshair" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
// Add canvas selection
|
||||
viewMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "Legacy Graphic&s" ), m_hotkeysDescrList,
|
||||
HK_CANVAS_LEGACY );
|
||||
// Drawing Mode Submenu
|
||||
wxMenu* drawingModeSubMenu = new wxMenu;
|
||||
|
||||
viewMenu->Append(
|
||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_LEGACY,
|
||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
||||
_( "Sketch &Pads" ), _( "Show pads in outline mode" ),
|
||||
KiBitmap( pad_sketch_xpm ), wxITEM_CHECK );
|
||||
|
||||
text = AddHotkeyName( _( "Modern (&Accelerated)" ), m_hotkeysDescrList,
|
||||
HK_CANVAS_OPENGL );
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
|
||||
_( "Sketch Footprint &Edges" ), _( "Show footprint edges in outline mode" ),
|
||||
KiBitmap( show_mod_edge_xpm ), wxITEM_CHECK );
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
|
||||
_( "Sketch Footprint Te&xt" ), _( "Show footprint text in outline mode" ),
|
||||
KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
|
||||
|
||||
viewMenu->Append(
|
||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL,
|
||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( viewMenu, drawingModeSubMenu,
|
||||
-1, _( "&Drawing Mode" ),
|
||||
_( "Select how items are displayed" ),
|
||||
KiBitmap( add_zone_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Modern (Fallba&ck)" ), m_hotkeysDescrList,
|
||||
HK_CANVAS_CAIRO );
|
||||
|
||||
viewMenu->Append(
|
||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO,
|
||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
||||
wxITEM_RADIO ) );
|
||||
text = AddHotkeyName( _( "&High Contrast Mode" ), m_hotkeysDescrList,
|
||||
HK_SWITCH_HIGHCONTRAST_MODE );
|
||||
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, text,
|
||||
_( "Use high contrast display mode" ),
|
||||
KiBitmap( contrast_mode_xpm ), wxITEM_CHECK );
|
||||
|
||||
#ifdef __APPLE__
|
||||
viewMenu->AppendSeparator();
|
||||
#endif
|
||||
|
||||
|
||||
//-------- Setup menu --------------------
|
||||
wxMenu* setupMenu = new wxMenu;
|
||||
|
||||
// Sizes and Widths
|
||||
AddMenuItem( setupMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
||||
_( "Te&xts and Drawings..." ),
|
||||
_( "Adjust dimensions for texts and drawings" ),
|
||||
KiBitmap( text_xpm ) );
|
||||
|
||||
// Pad settings
|
||||
AddMenuItem( setupMenu, ID_MODEDIT_PAD_SETTINGS,
|
||||
_( "Default &Pad Properties..." ),
|
||||
_( "Edit settings for new pads" ),
|
||||
KiBitmap( pad_dimensions_xpm ) );
|
||||
|
||||
//-------- Place menu --------------------
|
||||
wxMenu* placeMenu = new wxMenu;
|
||||
|
@ -286,26 +339,30 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
placeMenu->AppendSeparator();
|
||||
|
||||
// Circle
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
|
||||
_( "&Circle" ), _( "Add graphic circle" ),
|
||||
KiBitmap( add_circle_xpm ) );
|
||||
|
||||
// Line or Polygon
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
|
||||
_( "&Line or Polygon" ),
|
||||
_( "Add graphic line or polygon" ),
|
||||
KiBitmap( add_polygon_xpm ) );
|
||||
// Text
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
|
||||
_( "&Text" ), _( "Add graphic text" ),
|
||||
KiBitmap( text_xpm ) );
|
||||
|
||||
// Arc
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
|
||||
_( "&Arc" ), _( "Add graphic arc" ),
|
||||
KiBitmap( add_arc_xpm ) );
|
||||
|
||||
// Text
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
|
||||
_( "&Text" ), _( "Add graphic text" ),
|
||||
KiBitmap( text_xpm ) );
|
||||
// Circle
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
|
||||
_( "&Circle" ), _( "Add graphic circle" ),
|
||||
KiBitmap( add_circle_xpm ) );
|
||||
|
||||
// Line
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
|
||||
_( "&Lines" ), _( "Add graphic line" ),
|
||||
KiBitmap( add_graphical_segments_xpm ) );
|
||||
|
||||
// Polygon
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_POLYGON_TOOL,
|
||||
_( "&Polygon" ), _( "Add graphic polygon" ),
|
||||
KiBitmap( add_graphical_polygon_xpm ) );
|
||||
|
||||
placeMenu->AppendSeparator();
|
||||
|
||||
|
@ -315,6 +372,41 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "Place footprint reference anchor" ),
|
||||
KiBitmap( anchor_xpm ) );
|
||||
|
||||
// Origin
|
||||
AddMenuItem( placeMenu, ID_MODEDIT_PLACE_GRID_COORD,
|
||||
_( "&Grid Origin" ),
|
||||
_( "Set grid origin point" ),
|
||||
KiBitmap( grid_select_axis_xpm ) );
|
||||
|
||||
|
||||
//----- Inspect menu ---------------------
|
||||
wxMenu* inspectMenu = new wxMenu;
|
||||
|
||||
AddMenuItem( inspectMenu, ID_MODEDIT_MEASUREMENT_TOOL,
|
||||
_( "&Measure" ),
|
||||
_( "Measure distance" ),
|
||||
KiBitmap( measurement_xpm ) );
|
||||
|
||||
//----- Tools menu ---------------------
|
||||
wxMenu* toolsMenu = new wxMenu;
|
||||
|
||||
AddMenuItem( toolsMenu, ID_MODEDIT_UPDATE_MODULE_IN_BOARD,
|
||||
_( "&Update Footprint on PCB" ),
|
||||
_( "Push updated footprint through to current board" ),
|
||||
KiBitmap( update_module_board_xpm ) );
|
||||
|
||||
AddMenuItem( toolsMenu, ID_MODEDIT_INSERT_MODULE_IN_BOARD,
|
||||
_( "&Insert Footprint on PCB" ),
|
||||
_( "Insert footprint onto current board" ),
|
||||
KiBitmap( insert_module_board_xpm ) );
|
||||
|
||||
toolsMenu->AppendSeparator();
|
||||
|
||||
AddMenuItem( toolsMenu, ID_MODEDIT_DELETE_PART,
|
||||
_( "&Delete a Footprint in Active Library" ),
|
||||
_( "Choose and delete a footprint from the active library" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
|
||||
|
||||
//----- Preferences menu -----------------
|
||||
wxMenu* prefs_menu = new wxMenu;
|
||||
|
@ -339,11 +431,33 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "General &Settings..." ), _( "Change footprint editor settings." ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
prefs_menu->AppendSeparator();
|
||||
|
||||
AddMenuItem( prefs_menu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||
_( "&Display Settings..." ),
|
||||
_( "Change footprint editor display settings" ),
|
||||
_( "&Display Options..." ),
|
||||
_( "Graphics acceleration, grid and cursor settings." ),
|
||||
KiBitmap( display_options_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "Legacy Tool&set" ), m_hotkeysDescrList,
|
||||
HK_CANVAS_LEGACY );
|
||||
AddMenuItem( prefs_menu, ID_MENU_CANVAS_LEGACY, text,
|
||||
_( "Use Legacy Toolset (not all features will be available)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ),
|
||||
m_hotkeysDescrList, HK_CANVAS_OPENGL );
|
||||
AddMenuItem( prefs_menu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ),
|
||||
m_hotkeysDescrList, HK_CANVAS_CAIRO );
|
||||
AddMenuItem( prefs_menu, ID_MENU_CANVAS_CAIRO, text,
|
||||
_( "Use Modern Toolset with software graphics (fallback)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
prefs_menu->AppendSeparator();
|
||||
|
||||
// Language submenu
|
||||
Pgm().AddMenuLanguageList( prefs_menu );
|
||||
|
||||
|
@ -364,7 +478,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
|
||||
KiBitmap( help_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&List Hotkeys..." ), g_Pcbnew_Editor_Hotkeys_Descr, HK_HELP );
|
||||
text = AddHotkeyName( _( "&List Hotkeys..." ), m_hotkeysDescrList, HK_HELP );
|
||||
AddMenuItem( helpMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
|
||||
text,
|
||||
_( "Displays current hotkeys table and corresponding commands" ),
|
||||
|
@ -388,9 +502,11 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
menuBar->Append( fileMenu, _( "&File" ) );
|
||||
menuBar->Append( editMenu, _( "&Edit" ) );
|
||||
menuBar->Append( viewMenu, _( "&View" ) );
|
||||
menuBar->Append( setupMenu, _( "&Setup" ) );
|
||||
menuBar->Append( placeMenu, _( "&Place" ) );
|
||||
menuBar->Append( inspectMenu, _( "&Inspect" ) );
|
||||
menuBar->Append( toolsMenu, _( "&Tools" ) );
|
||||
menuBar->Append( prefs_menu, _( "P&references" ) );
|
||||
menuBar->Append( dimensions_Submenu, _( "Di&mensions" ) );
|
||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||
|
||||
menuBar->Thaw();
|
||||
|
|
|
@ -178,7 +178,8 @@ void prepareSetupMenu( wxMenu* aParentMenu )
|
|||
|
||||
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
||||
_( "&Design Rules..." ),
|
||||
_( "Open design rules editor" ), KiBitmap( config_xpm ) );
|
||||
_( "Open design rules editor" ),
|
||||
KiBitmap( config_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
|
@ -218,33 +219,29 @@ void preparePreferencesMenu( PCB_EDIT_FRAME* aFrame, wxMenu* aParentMenu )
|
|||
KiBitmap( preference_xpm ) );
|
||||
#endif
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
// Display Settings
|
||||
AddMenuItem( aParentMenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||
_( "&Display Options..." ),
|
||||
_( "Graphics acceleration, grid, cursor, annotation and clearance outline settings." ),
|
||||
KiBitmap( display_options_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Legacy Toolset" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
text = AddHotkeyName( _( "Legacy Tool&set" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
HK_CANVAS_LEGACY );
|
||||
aParentMenu->Append(
|
||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY,
|
||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY, text,
|
||||
_( "Use Legacy Toolset (not all features will be available)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
HK_CANVAS_OPENGL );
|
||||
aParentMenu->Append(
|
||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL,
|
||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
HK_CANVAS_CAIRO );
|
||||
aParentMenu->Append(
|
||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO,
|
||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
||||
wxITEM_RADIO ) );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
|
@ -686,7 +683,7 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
|
|||
#else
|
||||
AddMenuItem( aParentMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||
_( "Full Window Crosshair" ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
@ -726,8 +723,8 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
|
|||
|
||||
text = AddHotkeyName( _( "Sketch &Tracks" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
HK_SWITCH_TRACK_DISPLAY_MODE );
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
||||
text, _( "Show tracks in outline mode" ),
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, text,
|
||||
_( "Show tracks in outline mode" ),
|
||||
KiBitmap( showtrack_xpm ), wxITEM_CHECK );
|
||||
|
||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH,
|
||||
|
|
|
@ -444,8 +444,12 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
break;
|
||||
|
||||
case ID_PCB_DRAW_VIA_BUTT:
|
||||
DisplayError( this, _( "Via Tool not available in Legacy Toolset" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
|
||||
case ID_PCB_MEASUREMENT_TOOL:
|
||||
DisplayError( this, _( "This tool is not available in the legacy canvas" ) );
|
||||
DisplayError( this, _( "Measurement Tool not available in Legacy Toolset" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
|
||||
|
|
|
@ -477,8 +477,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
"and faster experience. This option is turned off by "
|
||||
"default since it is not compatible with all computers.\n\n"
|
||||
"Would you like to try enabling graphics acceleration?\n\n"
|
||||
"If you'd like to choose later, select the Modern "
|
||||
"(Accelerated) graphics mode in the View menu." );
|
||||
"If you'd like to choose later, select Modern Toolset "
|
||||
"(Accelerated) in the Preferences menu." );
|
||||
|
||||
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
||||
wxYES_NO );
|
||||
|
|
|
@ -233,7 +233,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar()
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
|
|||
#else
|
||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
||||
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||
wxITEM_CHECK );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ void PCB_EDIT_FRAME::OnUpdateDrcEnable( wxUpdateUIEvent& aEvent )
|
|||
aEvent.Check( state );
|
||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF,
|
||||
Settings().m_legacyDrcOn ?
|
||||
_( "Disable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) :
|
||||
_( "Enable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) );
|
||||
_( "Disable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) :
|
||||
_( "Enable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) );
|
||||
}
|
||||
|
||||
void PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent )
|
||||
|
|
|
@ -662,7 +662,8 @@ int DRAWING_TOOL::DrawGraphicPolygon( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::GRAPHIC_POLYGON );
|
||||
|
||||
m_frame->SetToolID( ID_PCB_ADD_POLYGON_BUTT, wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
|
||||
m_frame->SetToolID( m_editModules ? ID_MODEDIT_POLYGON_TOOL : ID_PCB_ADD_POLYGON_BUTT,
|
||||
wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
|
||||
|
||||
return drawZone( false, ZONE_MODE::GRAPHIC_POLYGON );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue